0

Python outputs 1 0 0 0

Why does python output print(1.000.000.000) ? Is it because it sees the "." as a break and then discard the two last zeros, because 000 is the same as 0 ? Hope i make sense, and somone could explain it to me, have a great day 😏

2nd Apr 2018, 4:40 AM
Steven
Steven - avatar
3 Antworten
+ 4
I think you mean print(1,000,000,000) with a comma, which results in 1 0 0 0 and not print(1.000.000.000) with a period, which will result in a syntax error. The ',' commas indicate to the print function multiple values are being passed. In which case each value is evaluated and then output to the stream separated by a space. The 000 issue is as @MemphisReigns stated.
2nd Apr 2018, 5:07 AM
ChaoticDawg
ChaoticDawg - avatar
0
ahh, alright that makes sense 🙂 Thank you two !
2nd Apr 2018, 5:36 AM
Steven
Steven - avatar