This is my code-
def read_data():
filename=(r"\School_Project\Data\votes.csv")
with open(filename) as csvfile:
for data in csvfile: #here data
csvfile.seek(0)
for x in csvfile.readlines():
return print(x)
read_data()
Here the data is not iterating i.e. for loop isnt working well inside function body and cannot print all the values in the file only 1st line is being printed
Please help me out with this error