Argument of the bool function

Chris Angelico rosuav at gmail.com
Mon Apr 25 15:33:13 EDT 2011


On Tue, Apr 26, 2011 at 12:29 AM, Thomas Rachel
<nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de>
wrote:
> for function in actions:
>     results.append(function())

Can this become:

results = [function() for function in actions]

Chris Angelico



More information about the Python-list mailing list