Skip to content

Commit 8c8abe4

Browse files
authored
Update str_return_type_hint_example.py
Added type for list
1 parent 9c216a9 commit 8c8abe4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import random
22

33

4-
def get_game_recommendation(titles: list) -> str:
4+
def get_game_recommendation(titles: list[str]) -> str:
55
return random.choice(titles)
66

77

88
games = ["Dragon Quest", "Final Fantasy", "Age of Empires"]
99
print(f"Random recommendation: {get_game_recommendation(games)}")
10+

0 commit comments

Comments
 (0)