[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] coloring book program to try



> Hrm is there a better way to reverse the order of my sequence that works
> for Python 2.2 users also?
>
> Michael <mogmios@mlug.missouri.edu>
> http://kavlon.org

As long as its a list, you can always use the reverse method. If it's not
a list, you may consider changing it into a list.

###
>>> alist = [1,2,3,'a','b','c']
>>> alist.reverse()
>>> alist
['c', 'b', 'a', 3, 2, 1]
###

---
Zak Arntson
www.harlekin-maus.com - Games - Lots of 'em