17
15
108
6K
34
Download Image
nums = [1, 2, 3, 4]` The expression `[x ** 2 for x in nums if x % 2 == 0]` means: Take each `x` in `nums` Check if it’s even (`x % 2 == 0`) If true, square it (`x ** 2`) So only even numbers `2` and `4` are squared → `2² = 4`, `4² = 16`. ✅ Output: [4, 16] which is (Option B)
She told me she'd never date a bald guy.. Here's what i did next..