Re: Another question about pythonic syntax, yea!
Be careful when removing items using for loops.
if you do some thing like this.
x [1, 2, 3, 4, 5, 6, 7]
for item in x:
if item == 3 x.remove(item)
the index will skp the next element, so 4 will not be checked. if you have
x = [1, 2, 3, 3, 4, 5]
will only remove the first number 3 element in the list.
for those cases is better use list comprehension instead for loops.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector