I am curious why in Python a trailing comma in a list is valid syntax, and it seems that Python simply ignores it:
>>> ['a','b',]
['a', 'b']
It makes sense when its a tuple since ('a') and ('a',) are two different things, but in lists?
I am curious why in Python a trailing comma in a list is valid syntax, and it seems that Python simply ignores it:
>>> ['a','b',]
['a', 'b']
It makes sense when its a tuple since ('a') and ('a',) are two different things, but in lists?