Created
May 27, 2025 01:14
-
-
Save mypy-play/48be8a6e1e869507d0495f668ee37287 to your computer and use it in GitHub Desktop.
Shared via mypy Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
records:list[dict[str,int]] = [ | |
{"amount": 10}, | |
{"amount": "ERROR"}, | |
{"amount": 25} | |
] | |
total = sum([rec["amount"] for rec in records]) | |
print("Total =", total) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment