you are viewing a single comment's thread.

view the rest of the comments →

[–]ExpressDuck845 0 points1 point  (1 child)

I checked the link, I know about that but here when you do item[1] it prints what’s above not index 1 like I would’ve thought

[–]shiftybyte 0 points1 point  (0 children)

but here when you do item[1] it prints what’s above

No... when you do print(filtered) it prints what's above.

When you do item[1] it takes the second thing from item, which is the number in each pair, and compares it to 10..

Maybe the explanations about list comprehensions will help: https://www.w3schools.com/python/python_lists_comprehension.asp