I have a csv file with multiple lines, a line contains a name, city and a street.
So one line looks like this:
Peter,Berlin,Kurfürstendamm
My function send the name, city and street to a form on a website.
Now I want to know if I can read the lines and the function send the first line of name, city and street to the form and if it's done it sends the next line of name, city and street to the form (so often as lines in the csv file).
I already tried this:
with open('profiles.csv') as f:
lines = f.readlines()[1:]
for line in lines:
line = line.strip()
signup(line)
The [1:]
is to skip the first line because the first line only contains the title of the name, city and street rows.
question from:
https://stackoverflow.com/questions/65645063/run-function-so-often-like-lines-in-a-csv-file 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…