Skip to content

Conversation

varian97
Copy link
Contributor

Add list comprehension section in List and Tuple Tutorial

@Akuli
Copy link
Owner

Akuli commented Oct 14, 2019

Introducing list comprehensions in the list and tuple tutorial seems like a good idea. Maybe also show an example that does the same thing by filling in a list with a loop, and mention that list comprehensions are just a shorter way to write a loop like that?

numbers_squared = [] for number in numbers: numbers_squared.append(number**2) 
@varian97
Copy link
Contributor Author

Thanks for the suggestion, I have edited the tutorial with the example given.

Akuli added a commit that referenced this pull request Jul 25, 2020
@Akuli
Copy link
Owner

Akuli commented Jul 25, 2020

Your commits are now in the tutorial, 93a00c2 and 52073d8. Don't know why they don't show up on github. Also I don't know why I didn't do anything about python-tutorial pull requests in about a year.

@Akuli Akuli closed this Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants