Fill the blanks

Report a typo

Below you can see the code that chooses some elements from one list and appends them to another:

for a in x:
    for el in a:
        if el > 0:
            els.append(el)

Fill in the blanks in the code below so that list comprehension produces the same result as the code above.

Write a program in Python 3
# here we create the initial list from the input, please do not modify this line
x = json.loads(input())

els = [el for __ in x for __ in a __ el > 0]
___

Create a free account to access the full topic