Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You can make 'getGuessedWord' a smaller code with this. #1

Open
uzairmahmed opened this issue Sep 16, 2015 · 1 comment
Open

You can make 'getGuessedWord' a smaller code with this. #1

uzairmahmed opened this issue Sep 16, 2015 · 1 comment

Comments

@uzairmahmed
Copy link

def getAvailableLetters(lettersGuessed):
'''
lettersGuessed: list, what letters have been guessed so far
returns: string, comprised of letters that represents what letters have not
yet been guessed.
'''
abc = string.ascii_lowercase
joined = "".join(lettersGuessed)
abc = abc.translate(None, joined)
return abc

I tried and it works.

@shaunlgs
Copy link
Owner

Thanks for that, that's cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants