[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Quick question from newbie
It worked. Thank you.
On Oct 31, 2007, at 10:20 PM, Michael George wrote:
Michael George wrote:
Yes you are. "if i == range(1,9)" compares i against the iterator
returned by the range function. Assuming i is a number, it will
never be equal (since a number is not an iterator). Your function
would print "It worked!" if you called print_i(range(1,9)).
Actually to correct myself range returns a list, xrange returns an
iterator.