Toggle

Dave Angel davea at davea.name
Thu Oct 9 03:24:22 CEST 2014


Seymore4Head <Seymore4Head at Hotmail.invalid> Wrote in message:
> I want to toggle between color="Red" and color="Blue"
> Here is one:
>     if color == "Red":
>         color = "Blue"
>     else:
>         color = "Red"
> Here is two:
> if x = "True" color = "Red"
> else:
> color="Blue"
> x= not x
> 
> Others?
> 

One looks like it wrks and two looks like nonsense.   Just what
 are you trying to ask?

-- 
DaveA




More information about the Python-list mailing list