Skip to content

Instantly share code, notes, and snippets.

@richardbwest
Last active July 22, 2016 14:44
Show Gist options
  • Save richardbwest/4f52ff243a1fd7a76697a4e7888891c2 to your computer and use it in GitHub Desktop.
Save richardbwest/4f52ff243a1fd7a76697a4e7888891c2 to your computer and use it in GitHub Desktop.
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