# Start with inventory = {'apple': 3, 'banana': 5, 'cherry': 7}

Canonical URL: <https://datadriven.io/problems/start-with-inventory-apple-3-banana-5-cherry-7-2a65f106>

Domain: Python · Difficulty: medium

## Problem

Start with inventory = {'apple': 3, 'banana': 5, 'cherry': 7}. Remove 'banana' using del. Pop 'cherry' and store the popped value in a variable called c. Print inventory, then print c, then print the length of inventory.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/start-with-inventory-apple-3-banana-5-cherry-7-2a65f106)
- [Python Interview Questions](https://datadriven.io/python-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.