Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
inventory = {"apples": 50, "bananas": 30, "oranges": 20} inventory["grapes"] = 15 inventory["apples"] += 10 del inventory["bananas"] print(inventory) print("apples" in inventory) # True print(len(inventory)) # 3
Result
Open