Python Forum
python dictionary is that a bug ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python dictionary is that a bug ?
#1
"PLEASE IGNORE THIS POST....I MADE A MISTAKE I CAUGHT MY OWN ERROR"

I created below dictionary and then printed values for all the keys

d={0:0,1:1,2:2}

print(d[0])
print(d[1])
print(d[2])

Strangely i get following outputs
0
True (if this is correct then why for 0 it did not give as False)
2
Reply


Messages In This Thread
python dictionary is that a bug ? - by rmangla - Sep-27-2023, 04:22 AM
RE: python dictionary is that a bug ? - by DPaul - Sep-27-2023, 05:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Convert List of Dictionary to dictionary of dictionary list in python kk230689 2 54,683 Apr-27-2019, 03:13 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020