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

Assigning To A Key Twice

easyDictionaries

📄 Code

Read carefully — what does this print?
1ages: dict[str, int] = {'Ann': 20, 'Bo': 22}
2ages['Ann'] = 21
3ages['Cy'] = 19
4ages['Bo'] = ages['Bo'] + 1
5print(ages)
6print(len(ages))

🎯 Your Answer