Home > other >  Consult a python dictionary keys match problem:
Consult a python dictionary keys match problem:

Time:10-23

Ah, the keys of the dictionary is a what type is this dictionary, how not matching, since to write a '000' to try all string matching less than

CodePudding user response:

Python dictionary keys must be immutable, such as string, number or a tuple,

General use string is more,

I think as a key string should be no Spaces before and after, otherwise it is hard to understand,

CodePudding user response:

You somehow stick point code for everyone to see how you match

CodePudding user response:

Ok, I sent from a code attached

CodePudding user response:

You see if the string has Spaces, one thousand the space is not the result you match several years

CodePudding user response:

Okay, settled, FanZhuanLai dictionary, wore a Spaces on key
  • Related