Practice ยท 1 of 3
Safe Lookup
CHALLENGE
Difficulty: beginner+25 XP
stock = {"apple": 5, "pear": 0} is given. Print the count for "banana" without crashing โ use .get() with a default of 0.
Press Submit to check your solution.
Back to lesson: Practice: Dictionary Drills