kevin parks wrote:
>>From: Kent Johnson <[EMAIL PROTECTED]>
>>If you want to be able to print the name of the list then you could
>>include both the name and the actual list in x:
>>
>>      x = [(('lst_a', lst_a), .50), etc...]
> 
> 
> 
> That produces:
> ('lst_c', ['Ale', 'Lager', 'Pilsner', 'Bock', 'Porter', 'Stout'])
> ['Ale', 'Lager', 'Pilsner', 'Bock', 'Porter', 'Stout']
> 
> i am actually trying to get name of list, the choice like so:
> 
> lst_c
> Bock

Yes, you need to unpack the result of calling windex(). You so ably 
demonstrated unpacking the list in your for loop I thought you would 
figure it out :-)

Try
   lst_name, lst = windex(x)

then random.choice() and print.

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to