On 6/1/2013 11:58 PM, Jim Mooney wrote:

     squarelist = (c**2 for c in range(x,y) if c%2 != 0)

can be simplified to:

squarelist = (c**2 for c in range(x,y,2))

as long as x is odd.

--
Bob Gailer
919-636-4239
Chapel Hill NC

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to