python - How to make 0 get counted as an integer? -


each time put 0 @ beginning of 7 digit code ignored , not times 3. have feeling need change str() int() (and vice-versa) may wrong. grateful assistance in matter.

numeric literals starting 0 interpreted being in base 8.

>>> int("755", base=8) 493 >>> 0755 493 >>> input("> ") > 0755 493 

Comments

Popular posts from this blog

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -