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

Use itertools.product() instead of nested for-loops #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Use itertools.product() instead of nested for-loops #2

wants to merge 1 commit into from

Conversation

vterron
Copy link
Contributor

@vterron vterron commented Feb 20, 2016

This is arguably more readable, and introduces students to the always amazing itertools module.

@vterron vterron changed the title Use itertools.product() instead of a nested for-loops Use itertools.product() instead of nested for-loops Feb 20, 2016
This is arguably more readable, and introduces students to the always amazing itertools module.
@astrojuanlu
Copy link
Member

Thanks @vterron! I'd rather disagree that this is more readable than the double for loop though. From a novice point of view, this introduces a new import and a new function that one has to explain. If you rephrase this PR leaving that cell as-is and introducing a new one explaining the new syntax I will merge it :)

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