Created
August 21, 2021 21:21
-
-
Save daniel-schroeder-dev/6ffff19d0714484f0c216fb5f3f56f50 to your computer and use it in GitHub Desktop.
Elijah
This file contains hidden or 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
import random | |
sentences = ("I forgot the colon in the if statement.", "I'm Drunk!", "Don't Do Drugs") | |
for sentence in sentences: | |
words = sentence.split() | |
randomWord = random.choice(words) | |
new_sentence = "" | |
for word in words: | |
# if the word is the randomWord, hide it | |
# otherwise, add the word to the new sentence |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment