Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Comprehensions

Matthew Krey
Matthew Krey
3,973 Points

Python Comprehensions

At 10:19 in the video, after your set comprehension example, how does your list comprehension example work?

[ound(x/y) for u in range(1, 11) for x in range(2, 21)]

Do you not need to call the round function?

He does call the round function. He just goes back and changes the '{' brace to a '['; the 'r' just disappears on the screen, but is actually still there. Workspaces acts weird when editing in it's command line. Does that make sense?

4 Answers

He does call the round function. He just goes back and changes the '{' brace to a '['; the 'r' just disappears on the screen, but is actually still there. Workspaces acts weird when editing in it's command line. Does that make sense?

Thanks!

Matthew Krey
Matthew Krey
3,973 Points

For sure! Thank you for getting back to me on that. It just looked odd...

You got it.

Matthew Krey
Matthew Krey
3,973 Points

Hey Scott can you go back and add your original answer as an Answer? I'd like to make sure I give you the "Best Answer" credit ;)