From 9bc1f91b0b766ad49e6df4ef74515b0637007e94 Mon Sep 17 00:00:00 2001 From: Dendy Date: Mon, 31 Jan 2022 11:32:58 +0100 Subject: [PATCH] Fix uppercasing of repeated characters --- wordle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wordle.py b/wordle.py index eb70330..8aa5468 100755 --- a/wordle.py +++ b/wordle.py @@ -32,7 +32,7 @@ def word(palabra): break while i != 5: if guess[i] == palabra[i]: - guess = guess.replace(guess[i], guess[i].upper()) + guess = guess[:i] + guess[i].upper() + guess[i+1:] i += 1 print(guess) hp -= 1