players = {
"nome": "",
"score": []
}
cancel = False
player_list = []
while (True):
name = input("Insert player name: ")
player_list.append({
"Player Name": name
})
cont = input("Do you wish to add another player? (Y/N)")
if cont == "N":
break;
print("Player List: ", player_list)
while (True):
eliminate_player = input("Select player to delete: ")
player_list.pop({
"Player Deleted": eliminate_player
})
print ("Updated List", player_list)
Hello everyone! Im having some trouble deleting an entry from my player list using user input. Im getting the error:'dict' object cannot be interpreted as an integer but I can't seem to find what is wrong because Im using similar method I used to add players and it worked fine.
Any ideas?