Skip to main content
← CoursesPython FoundationsModule 4 · Object-oriented programmingPredict: map and filter chainedpredict71 / 170
💬 Discuss🧪 Playground+75 XP
Task
📝 **Task:** Predict what this prints:\n\n\`\`\`python\nnums = [1, 2, 3, 4, 5, 6]\nresult = list(map(lambda x: x * 10, filter(lambda x: x % 2 == 0, nums)))\nprint(result)\n\`\`\` 📋 Edit the starter code below. Tests run automatically. 💡 **Hint:** Re-read the theory if you get stuck.

Keep going

🔮 Predict the output

Read the code carefully

# filter keeps even: [2, 4, 6]
# map multiplies by 10: [20, 40, 60]
print([20, 40, 60])

What will the program print? Write here:

📣 Help someone learn PythonShare this lesson with a friend — the first 15 are free, no signup.Tweet

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…