Filter with a Comprehension

Lab Python Beginner 10 points

Read a line of integers and print only the even ones, each doubled, as a list.

Input

One line of space-separated integers.

Output

The list.

Example

Input

1 2 3 4 5 6

Output

[4, 8, 12]
Sample input available Sample output available
Editor
Python

Hints

Add an if at the end of a comprehension to filter.

Solution explanation

[expr for x in items if condition] maps and filters in one step.

Show solution
nums = map(int, input().split())
print([x * 2 for x in nums if x % 2 == 0])
Output
Answer
HOME LEARN COMMUNITY DASHBOARD