101k views
3 votes
Which statement will remove 12:'uno' from the dictionary?

games = {8:'scrabble', 10:'xbox', 12:'uno'}

games.remove()

games.pop(12)

games.pop()

games.remove(12)

2 Answers

6 votes

Answer:

games.pop(12)

Step-by-step explanation:

User Cwadding
by
6.7k points
2 votes

Answer: games.pop(12)

Step-by-step explanation:

In a dictionary sequence, .pop() alone does not work as the variable needs to be defined. Adding 12 allows Python to identify this variable. .remove() does not work with or without a variable.

User Katiak
by
6.3k points