- 1
Question
In math notation, leading zeros are OK, as in 02. What happens if you try this in Python and why?
4 Answers
+ 3
Jamilu Abdullahi Nura Remove shared post first and tell your actual problem.
+ 2
Jamilu Abdullahi Nura Try to check in Sololearn Playground and search the answer of that error which will come.
Btw to add leading zero convert number in String then do concatenation like this
print(str(0) + str(5))
+ 1
Jamilu Abdullahi Nura, please remove all these links from your post:
Linking to unrelated material in a question or answer is considered spam!
To your question:
There's no point asking yourself why the syntax in language x is like this or that. It's a matter of definition.
In Python, you can use leading zeros for all numbers except int.
0
I have this question in my weekly report and I want hint what I should do: "In math notation, leading zeros are OK, as in 02. What happens if you try this in Python and why?"