BUG: Hangman (Python) had a List-vs-Str comparison

MAINT: Add type annotations to find such issues
This commit is contained in:
Martin Thoma
2022-03-31 10:33:11 +02:00
parent b31c624703
commit ae0b6a5015
22 changed files with 347 additions and 365 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ import random
def main() -> None:
WORDS = [
words = [
[
"Ability",
"Basal",
@@ -85,7 +85,7 @@ def main() -> None:
still_running = True
while still_running:
phrase = ""
for section in WORDS:
for section in words:
if len(phrase) > 0:
phrase += " "
phrase += section[random.randint(0, len(section) - 1)]