The task is to read the desired line from the products_links.csv file and get the string to later use it as a URL.
I know that the code is not written correctly. Having studied the documentation here - https://docs.python.org/release/3.2/library/csv.html , I still do not understand how I can do what is needed.
import csv k = 0 n = 1 def read_csv(k,n): reader = csv.reader(open("products_links.csv", newline='')) next(reader) #Знаю, что пропускать fieldsname можно и нужно иначе, задача не в этом. while k < n: d = (next(reader)) k += 1 return d d = read_csv(k, n) f = d[0] print(f)