Hello , I am trying to implement this function:
def getGuessedWord(theword, wordlist):
for letter in theword:
if letter in wordlist:
print letter,
else:
print '_',
For example:
theword = 'hi'
wordlist = ['e', 'i', 'o', 's']
must return : _i
but it returns : _iNone
I tried :
for letter in secretWord:
if letter in lettersGuessed:
print letter,
else:
print '_',
return letter
but it returns : _ii