+ 2
Why we can't type comma separated integer value in Python
I tried to print r =1,000,000 but value printed in binary like [1,0,0].. https://code.sololearn.com/cPZxfz93iklK/?ref=app
1 Odpowiedź
+ 1
in python when you put interger with commas it takes that as a tuple. tuple can be declared without open braces ()... so if you decalred
a = 1,2,3
its same as a = (1,2,3)
so there is no need to put comma if you are not declaring a tuple and declaring a normal integer