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

Re: [pygame] Re: more basic python lists question



On Thu, Nov 17, 2011 at 1:32 PM, Sean Wolfe <ether.joe@xxxxxxxxx> wrote:
   if not f.endswith('.png')
for f in filenames:
        filenames.remove(f)

Along with lots of warnings to copy from one list to another rather
than delete on an iterating list. But really how much harm could it
do? lol... I think.

No, it won't work. Try it with:

filenames = ["a.png", "b.gif", "c.gif"]

-Christopher