random.randint(50,9)
or
random.randint(5,09)
give errors, although just
random.randint(5,9)
..works!
Leading and trailing zero’s aren’t allowed in python without converting it to string or using x.f formatting?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
oh, dear. “Trailing” zero gives error because first argument to
randintshould be smaller than the second.Leading zeros are used to represent octal numbers in python-2.x as in many other languages.