I'm wrong or Will we fix the ducks limp?

Michael Selik michael.selik at gmail.com
Fri Jun 3 12:04:18 EDT 2016


On Fri, Jun 3, 2016 at 11:58 AM Sayth Renshaw <flebber.crue at gmail.com>
wrote:

> That totally makes sense I was just double checking, had hoped I could
> create a variable assign it to a list and append in one stroke.
>

In fact you can! It's called a "list comprehension"

    pyqFiles = [pq(my_dir + filename) for filename in sorted(file_list)]


More information about the Python-list mailing list