March 19, 2019 at 9:10 pm
Comments posted to this topic are about the item The Comprehensive Set
March 20, 2019 at 12:18 am
learned something new, thanks, Steve
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
March 20, 2019 at 3:00 am
March 20, 2019 at 9:47 am
The answer is correct but the explanation is incorrect.
March 20, 2019 at 9:59 am
The explanation is confusing.
print ([x%2 for x in range(10) if x % 2 == 0]) returns 5 values, but all of them are 0 (x % 2).
A set returns distinct values, consequently the result is just one 0.
14090 SW TENNESSEE LN
March 21, 2019 at 8:08 am
gary.rumble - Wednesday, March 20, 2019 9:59 AMThe explanation is confusing.
print ([x%2 for x in range(10) if x % 2 == 0]) returns 5 values, but all of them are 0 (x % 2).
A set returns distinct values, consequently the result is just one 0.
Copy pasted part of the explanation from another question. The explanation is changed to note that x%2 returns 0 for even numbers.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply