0
why wé put comma after an item
4 odpowiedzi
+ 2
I wonder if you're in a country that uses "." for thousands and "," for decimal like:
77.000,00
Python (and many others) delimit by commas; it's a "convention" to improve clarity: one of Python's goals. And...Python was developed where commas separate groups:
77,000.00
Other languages (like Octave) are fine with just spaces...sometimes; that's their convention (perhaps related to Octave working a lot with numbers). Like currency notation, that's all it is.
+ 2
Also found this:
Python tuple "trailing comma" syntax rule:
http://stackoverflow.com/questions/7992559/python-tuple-trailing-comma-syntax-rule
It ensures that a single item is interpreted as a tuple and by convention avoids a syntax trap. See the link.
+ 1
To separate them. If it weren't there, how would you make a difference between [100 100] (being one element) and [100, 100] ?
0
thank you