Skip to content

feat: Add list comprehension in list tutorial#13

Closed
varian97 wants to merge 2 commits into
Akuli:masterfrom
varian97:feat/varian/list-comprehension
Closed

feat: Add list comprehension in list tutorial#13
varian97 wants to merge 2 commits into
Akuli:masterfrom
varian97:feat/varian/list-comprehension

Conversation

@varian97

Copy link
Copy Markdown
Contributor

Add list comprehension section in List and Tuple Tutorial

@Akuli

Akuli commented Oct 14, 2019

Copy link
Copy Markdown
Owner

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
Copy Markdown
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

Akuli commented Jul 25, 2020

Copy link
Copy Markdown
Owner

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants