[Tutor] is there a better way to do this?

Joel Goldstick joel.goldstick at gmail.com
Mon May 9 18:54:42 EDT 2016


On Mon, May 9, 2016 at 6:49 PM, Alan Gauld via Tutor <tutor at python.org> wrote:
> On 09/05/16 22:03, Ondřej Rusek wrote:
>
>> but for 'tuples in list'... simple:
>>
>> data = []
>> for record in curs:
>>    data += [record]
>
> Couldn't that be abbreviated to:
>
> date = list(curs)
>
I thought I nailed it earlier (and others) but this is great.  An
expressive language, python
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor



-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays


More information about the Tutor mailing list