Hey guys, please let me know if you have an answer to this (copy and paste into your IDE):
x = { 0: "value 0", 1: "value 1", 2: "value 2", True: False } print(x.get(0)) print(x.get(1)) print(x.get(2)) # output will look like this: # value 0 # False # value 2For some reason, only x.get(1) returns "False," and any other number or character will return with its dict definition. Does anyone know why that is? Thanks!
buran write Nov-04-2022, 08:26 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.