+ 1
PYTHON Dictionary problem
dict={1:"one",2:"two",True:False,None:"True"} print(dict[1]) This code prints "False" why?????? this should be "one"
1 Answer
+ 7
Cuz 1 and True are same thing...And the latter entry overrides the former
https://code.sololearn.com/cNBMv4WTIaui/?ref=app
See this if you ask python 1==True
Output is True....
So 1 and True are samething