On Sat, May 28, 2011 at 9:13 PM, pbreit <[email protected]> wrote:
> In python do you have to include the comma in a one item tuple? Yes, one item tuple needs extra comma. >>> t = (1) >>> type(t) <type 'int'> >>> t= (1,) >>>type(t) <type 'tuple'>
On Sat, May 28, 2011 at 9:13 PM, pbreit <[email protected]> wrote:
> In python do you have to include the comma in a one item tuple? Yes, one item tuple needs extra comma. >>> t = (1) >>> type(t) <type 'int'> >>> t= (1,) >>>type(t) <type 'tuple'>