What I have tried is
answer = "'You need to enter one alphabetic character which you haven't\
already guessed. Try again'"
counter = 0
p = [x.lower() for x in past_guesses]
if len(p) != (set(past_guesses)):
result = answer
else:
result = 'Good guess'
return result
As expected any duplicate letters should fail, returning the answer, and any that don't contain duplicate letters should pass, however for the input ([A, b]) I am getting the return for a duplicate.
Anyone know why and how this can be fixed?