(Python) This is my code for printing a roster for a team. WhenI print to the console, it makes the first player's name show up asnumber 2, and it says [] (its just blank for 1). How can I fix thatso the first player's name is 1, not skipping 1 and going to 2.
def file_to_dictionary(rosterFile):
myDictionary={}
myDict=[]
 Â
with open(rosterFile,'r') as f:
for line in f:
 Â
(num,first,last,position)=line.split()
myDictionary[num]= myDict
myDict=[first, last, position]
print (myDictionary)
return myDictionary
 Â
file_to_dictionary((f\"../data/playerRoster.txt\"))
 Â