Complete the codeExercise 7/7Elementary20 XP

Even numbers only

Task

The function parne(cisla) should return a new list with only the even numbers - in the original order. Fill in ___.

Examples

  • Call

    print(parne([1, 2, 3, 4]))

    Expected output

    [2, 4]

Rules

  • Replace ___ with the right code.

After you submit, 3 hidden tests will also check your solution: an empty list, no even numbers, zero and negatives.

Python starts the first time you run code.

Ctrl+Enter runs the program. Tab indents. Press Esc, then Tab, to leave the editor.

Input (stdin)

Each line = one call to input().

Output

Hints

Try it yourself first. Each hint reveals a little more - and lowers the reward a little.

Signed out, hints are free - but no XP is awarded either.

Solution

The solution unlocks after the last hint.