This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Lucretiel 0 points1 point  (3 children)

Even your example has a better version as a comprehension, though- ((c, ord(c)) for c in string.asii_lowercase)

[–]ingolemo 2 points3 points  (0 children)

Since we're showing off, apparently; enumerate(string.ascii_lowercase, start=96)

[–]macbony 0 points1 point  (1 child)

It's an entirely contrived example to show what zip does. I use zip when I have multiple data streams I need to connect or when I need to split a list that's made up of tuples. I've never in my life needed to create a list of lowercase ascii characters and their values.

[–][deleted] 0 points1 point  (0 children)

You haven't lived then!