naming objects from string

Roberto Bonvallet Roberto.Bonvallet at cern.ch
Thu Sep 21 08:26:34 EDT 2006


manstey wrote:
[...]
> bob_apple=()
> bob_orange=()
> ..
> pete_red=()
> 
> I then populate the 9 tuples with data [...]

You cannot "populate" a tuple.  If you want to insert the values
individually, you have to use a list.  If you insert them all together,
like this:  bob_apple = (1, 2, ..., 9), you don't need to initialize
bob_apple with an empty tuple.

-- 
Roberto Bonvallet



More information about the Python-list mailing list