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

Joel Goldstick joel.goldstick at gmail.com
Mon May 9 12:43:44 EDT 2016


On Mon, May 9, 2016 at 4:13 AM, Chris Roy-Smith
<chris_roysmith at internode.on.net> wrote:
> Hi
> Python 3.4 Linux (ubuntu)
>
> This code does what I want.
> curs is the result of a mysql query
>
>
does this work (untested)?

data = []
for stuff in curs:
           data.append(stuff)
>
> While I don't know a better way to do this, it seems a bit awkward, is there
> a better way?
>
>
> Thank you
> Chris Roy-Smith
> _______________________________________________
> 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