Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add list comprehension in list tutorial #13

Closed
wants to merge 2 commits into from

Conversation

@varian97
Copy link
Contributor

@varian97 varian97 commented Oct 12, 2019

Add list comprehension section in List and Tuple Tutorial

@Akuli
Copy link
Owner

@Akuli 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

@varian97 varian97 commented Oct 20, 2019

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 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.