I meet a problem about converting number to string.
I want to get a string \"0100\" from str(0100), but what I got is \"64\". Does any way I can do to get a string \"010
Your first issue is that the literal "0100", because it begins with a digit 0, is interpreted in octal instead of decimal. By contrast, str(100) returns "100" as expected.
Secondly, it sounds like you want to zero-fill your numbers to a fixed width, which you can do with the zfill method on strings. For example, str(100).zfill(4) returns "0100".