CJCoding With Joseph
15free / daySign inCreate account
← Back to Question List
Python Code Walkthrough #39

Keys Keep Their Order

mediumDictionaries

📄 Code

Read carefully — what does this print?
1stock: dict[str, int] = {'pens': 3, 'ink': 0}
2stock['paper'] = 10
3stock['pens'] = 5
4for item in stock:
5 print(item, stock[item])
6print(len(stock))

🎯 Your Answer