I am sure there is an simple explanation but when I input
5 (as integer), resulting in 05 (as string), I get zero as the end
result. When running the code:
START OF PROGRAM:
Enter the 1st number: 5
05
0
END OF PROGRAM:
START OF CODE:
import sys
def numberentry():
print
number01 = raw_input("Enter the 1st number: ")
if number01 == "0":
sys.exit()
if len(number01) == 1:
number01 = "0" + number01
print
print number01
return(number01)
number01 = 0
numberentry()
print
print number01
END OF CODE:
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor