A dictionary literal lists the same equal key twice, first with value 1 and later with value 2. Which value is retained for that key?
Both values are retained under duplicate entries.
Value 1 is retained because the earliest entry wins.
Neither value is retained because SyntaxError occurs.
Value 2 is retained because the later entry wins.✓Correct answer
Explanation
A dictionary has only one entry for a given equal key, and the later value replaces the earlier one while the literal is built. Duplicate equal keys do not coexist and do not cause a syntax failure.