Here is my code I've tried:
import csv
f = open("nfl.csv", "r")
nfl = list(csv.reader(f))
patriots_wins = 0
for each in nfl:
if each[2] == "New England Patriots":
patriots_wins = patriots_wins + 1
return patriots_wins
print(patriots_wins)
It gives the below error:
SyntaxError: 'return' outside function