Last active
April 25, 2019 13:32
-
-
Save stephen-bunn/a756c7f3843d32adcc16eed78b9e59a1 to your computer and use it in GitHub Desktop.
Medium - Basic typing sample
This file contains 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
from typing import Dict, List | |
def handle_dictionary(dictionary: Dict[str, List[int]]) -> int: | |
result = 0 | |
for (key, value) in dictionary: | |
result += sum(value) | |
return result | |
handle_dictionary({"success": [1, 2, 3], "fail": ["1", 2, 3]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment