We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c216a9 commit 8c8abe4Copy full SHA for 8c8abe4
1 file changed
type-hint-arrow-samples/str_return_type_hint_example.py
@@ -1,9 +1,10 @@
1
import random
2
3
4
-def get_game_recommendation(titles: list) -> str:
+def get_game_recommendation(titles: list[str]) -> str:
5
return random.choice(titles)
6
7
8
games = ["Dragon Quest", "Final Fantasy", "Age of Empires"]
9
print(f"Random recommendation: {get_game_recommendation(games)}")
10
+
0 commit comments