>
>> > > for var in [value,value_1]:
>> > >   var = "green"
>>
>> > Um, that won't work.   You typed that example too quickly.
>
>
>> Excuse: It was early morning and I hadn't had any coffee...
>
>> In your defense Alan, after you typed that code in your response you 
>mentioned 
> the necessity of defining the variables:
Yes, but that's still not good enough. The loop above only sets var to green 
>it doesn't change the values of the variables in the list. That's why you need 
>to use enumerate and access them via an index. Basically its just not a good 
>plan, best to avoid it.

Alan G.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to