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

Last example in Set Comprehensions has incorrect return value #58

Open
jabocg opened this issue Feb 13, 2018 · 2 comments
Open

Last example in Set Comprehensions has incorrect return value #58

jabocg opened this issue Feb 13, 2018 · 2 comments

Comments

@jabocg
Copy link

jabocg commented Feb 13, 2018

The last example in comprehensions is

>>> {2**x for x in range(10)}
{32, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512}

where the return value should actually be

{1, 2, 4, 8, 16, 32, 64, 128, 256, 512}

Not sure where the extra 32 came from.

@jabocg
Copy link
Author

jabocg commented Feb 13, 2018

Link for lazy: comprehensions

@jabocg jabocg changed the title Last example in Comprehensions has incorrect return value Last example in Set Comprehensions has incorrect return value Feb 13, 2018
@AmitGuetaDev
Copy link

Isn't 2^5 equals 32?

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

No branches or pull requests

2 participants