0

I understand that the comma (,) makes Python think that print(1,000,000) is a list of three items to be printed.

However, why is only 1 zero (0) of the 3 printed? Surely 1 000 000 should be printed instead of 1 0 0? Why have the other 2 zeroes disappeared?

Thank you all for your help!! Alas I must appeal to the masters^^.

B D
  • 29
  • 2

1 Answers1

0

Python truncates leading zeros as they do not add to the value of the number, which in this case is 0.

Ovyerus
  • 121
  • 2
  • 8