i’m new in python and I’m wanting to do what I said above, but I don’t have any ideas, so how can I?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the code in your comment (you should put this in your question), it is with reading the lines from a file that you’re struggling.
The idiomatic way of doing this is like so:
[See File Objects in the official Python documentation].
Plugging this into your code (and removing the newline and any spaces from each line with
str.strip()):Note that URLs start with a scheme name (commonly called a protocol, such as
http), followed by a colon, and two slashes hence:But