diff --git a/wordle.py b/wordle.py old mode 100644 new mode 100755 index 417306c..8aa5468 --- a/wordle.py +++ b/wordle.py @@ -1,3 +1,5 @@ +#!/bin/env python + import random def getw(): @@ -30,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