Re: Python noob tuples question

2009-05-22 Thread Skylar Saveland
> if I start a tuple with ( ('john","adams")) Also, this is the same as ('john', 'adams')... it is just a tuple and not a tuple within a tuple ( ('john', 'adams'), ) (note the comma .. something of an idiom .. parenthesis do not create the tuple but rather the comma) would be a tuple containing

Re: Python noob tuples question

2009-05-22 Thread Oli Warner
On Fri, May 22, 2009 at 4:44 PM, CrabbyPete wrote: > if I start with PEOPLE = (('john','adams')) how do I add the > subsequent tuples? > Simple. Tuples are immutable (cannot be modified) so you don't contain your little tuples in a big tuple, you use a list. list = [] list.append(('my','tuple')

Re: Python noob tuples question

2009-05-22 Thread Brett Parker
On 22 May 08:44, CrabbyPete wrote: > > > I am trying to make a selector in a forms based on information in the > database. > > The selector uses a tuple like this: > > PEOPLE = (('john','adams'),('sam','smith'),('john','doe'), ...) > > if I start a tuple with ( ('john","adams")) > > > > i

Python noob tuples question

2009-05-22 Thread CrabbyPete
I am trying to make a selector in a forms based on information in the database. The selector uses a tuple like this: PEOPLE = (('john','adams'),('sam','smith'),('john','doe'), ...) if I start a tuple with ( ('john","adams")) if I start with PEOPLE = (('john','adams')) how do I add the subs