On 17/9/2013 09:21, Ferrous Cranus wrote:
> I just want to say tot he program that > > that only run the for statement if and only if person=='George' > > I dont see nay reason as to why this fails > > perhaps like: > > for times in range(0, 5) if person=='George': > > but that fails too... > there must be written on soem way. > > untested: for times in range(0, 5 if person=="George" else 0): But i also greately prefer the canonical version. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list