Johan Martinez <jmart...@gmail.com> writes:

> Where can I find syntax for list comps?

The same place as other syntax descriptions: in the language reference
<URL:https://docs.python.org/3/reference/expressions.html#displays-for-lists-sets-and-dictionaries>.

> I am confused how/whether they are evaluated left-right or right-left.

According to the documentation:

    […] the elements of the new container are those that would be
    produced by considering each of the for or if clauses a block,
    nesting from left to right, and evaluating the expression to produce
    an element each time the innermost block is reached.

> That's a bit confusing syntax for me. Sorry if I am not clear in
> explaining it.

Does that help? If not, please try re-phrasing the question.

-- 
 \           “The lift is being fixed for the day. During that time we |
  `\            regret that you will be unbearable.” —hotel, Bucharest |
_o__)                                                                  |
Ben Finney

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to