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

Re: [pygame] more basic python lists question



I don't know if it was intentional, but that's a masterful play on words if so :)

On 19 November 2011 03:41, Jake b <ninmonkeys@xxxxxxxxx> wrote:
That's called 'list comprehension': http://docs.python.org/tutorial/datastructures.html#list-comprehensions

On Thu, Nov 17, 2011 at 8:14 PM, Lee Buckingham <lee.buckingham@xxxxxxxxx> wrote:



filenames = [f for f in filenames if f.endswith(".png")]


Slick! I learn so much listening to you guys and your questions.



--
Jake