On 09/10/2014 02:25, Mark Lawrence wrote:
On 09/10/2014 01:11, Seymore4Head wrote:
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?


Here http://stackoverflow.com/questions/8381735/toggle-a-value-in-python
but why couldn't you search in the first place?


When I first read this I was extremely jealous of the originator but having used it umpteen times I'm still extremely jealous of the originator!!! Why doesn't my mind work like his? :)

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to