Inputs with a leading 0

Inputs with a leading 0 in python 2 are put into base 8 witch will result in breaking most programs and so

“Variable = str(input())”

Should be used instead to make the input into a string so it won’t be put into base 8. Alternatively,

“Raw_input()”

can be used as this will make the input into a string as well.

Leave a comment

Create your own website, free on WordPress.com.Create your own website.
Start free