Skip to content

Commit 706cfd5

Browse files
authored
Update dictionary_return_type_example.py
1 parent 4066631 commit 706cfd5

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
game_stock = {
2-
"Dragon Quest": 5,
3-
"Final Fantasy": 1,
4-
"Age of Empires": 5
5-
}
1+
game_stock = {"Dragon Quest": 5, "Final Fantasy": 1, "Age of Empires": 5}
2+
63

74
def get_highest_stock_game() -> dict[str, int]:
85
stock_quantities = game_stock.values()
@@ -11,10 +8,11 @@ def get_highest_stock_game() -> dict[str, int]:
118
if quantity > high:
129
high = quantity
1310
game_results = {}
14-
11+
1512
for game in game_stock:
1613
if game_stock[game] == high:
1714
game_results[game] = high
1815
return game_results
1916

20-
print(f"Games with the highest stock: {get_highest_stock_game()}")
17+
18+
print(f"Games with the highest stock: {get_highest_stock_game()}")

0 commit comments

Comments
 (0)