Sunday, June 1, 2014

Re: Transform list comprehension back to traditional looping construct, how?

On 2014-06-01, at 14:29 , Pepsodent Cola <pepsodentcola@gmail.com> wrote:

> Hi, I want to transform my articles_list5 list comprehension back to a traditional looping construct to make things easier to read.
> The articles_list5 returns a list of tuples.
>
> But when I try to do the same using traditional looping in articles_list6 then I just get one long list from everything. How do I transform list5 to list6 correctly so it still returns a list of tuples?

By using the right method? Why are you calling list.extend?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/A7A551D9-B631-4203-8E2E-D5271E3F8259%40masklinn.net.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment