In the code below, I need to print out the first 5 lines from the CSV file "winners.csv" and I don't know how to do it. I just know that lines 4-5 will cause all lines in the csv file to print.
The code in question:
wins = open("winners.csv", "r")
csv1 = csv.reader(wins, delimiter=",")
sort = sorted(csv1,key=operator.itemgetter(1),reverse=True)
for eachline in sort:
print(eachline)
wins.close()