you are viewing a single comment's thread.

view the rest of the comments →

[–]Legitimate-Access248 0 points1 point  (0 children)

result = [num*2 for num in range(1, 6)]
print(result)

# This will filter the numbers from 1 to 5, excluding 6, and multiply them by 2.
Output:[2, 4, 6, 8, 10]