I'm trying to figure out why the list comprehension below returns what it returns. I get a little confuse with the modulo indicator.
Example: The output below i cant understand the output.
print([i for i in range(11) if i%2])
Output: [1, 3, 5, 7, 9]
However in the example below I perfectly understand the return of even numbers.
print([i for i in range(11) if i%2==0])
[0, 2, 4, 6, 8, 10]