Last active
July 22, 2016 14:44
-
-
Save richardbwest/4f52ff243a1fd7a76697a4e7888891c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def drawTheWord(): | |
word = [] #Create a temporary list to add either letters or an underscore | |
for letter in chosenWord: | |
if letter in usedLetters: | |
word.append(letter) | |
else: | |
word.append("_") | |
print(" ".join(word)) #Combine the letters and underscores and print them out. | |
# The string.join(list) method is easy to use and powerful! :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment