#You might think this will work x = (1)But it actually makes x equal to 1. To get past this problem, you need only type
x=(1,)and now you have a tuple containing only 1 value.
This is all well and good, but some programmers take this and adopt the convention to add a comma at the end of every tuple.
x = (1,2,3,4,)
What do you guys think? Is the comma convention good or annoying?
This post has been edited by atraub: 06 May 2011 - 01:38 PM
Reason for edit:: alliteration ftw!