Two lists returned as a tuple

Predict the output · Medium · §8.4 Returning several values

Predict the output without running the code.

Code

def split_score(scores, cutoff):
    passed = []
    failed = []
    for s in scores:
        if s >= cutoff:
            passed.append(s)
        else:
            failed.append(s)
    return passed, failed

result = split_score([70, 45, 90], 60)
p, f = split_score([70, 45, 90], 60)
print(result)
print(len(p), f)

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.