this is giving all the "YES" layers from the list with open ("soccer_playerss.csv", newline='')as csvfile: player_read = csv.DictReader(csvfile, delimiter =',') player_list = list(player_read) print(player_list)
Dragons =[]
player = " "
#this is where I am facing the problem
def team_division(player):
for player in player_list:
if player['Soccer Experience'] == "YES":
Dragons.append(player)
print ("DRAGONS: ",Dragons)
Aucun commentaire:
Enregistrer un commentaire