Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPythonidentity vs equalitySingle-choice MCQ

After inserting a key `0.0` and then assigning to key `-0.0`, the dict ends with a single entry whose key reprs as `0.0`. What two facts about dict internals produce this exact outcome?

d = {0.0: 'pos'} d[-0.0] = 'neg' print(len(d), list(d.keys()), d[0.0])