Toggle

Seymore4Head Seymore4Head at Hotmail.invalid
Thu Oct 9 02:11:41 CEST 2014


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?



More information about the Python-list mailing list