leading zero causes an exception in the program

Question:

i hope you are doing well.

I have a question maybe it is stupid to ask rather than search.

but I looked up for a satisfactory answer.

Why leading zero is not allowed in some language, such as python.

what problems can leading zero produce?

thanks in advance!

Asked By: fale7

||

Answers:

This is not just in Python, many programming languages doesn’t allow leading zeros. This is because zero is used to define if number is for example binary or octal base numbers. More about them in Python here.

Answered By: Jimpsoni