-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Solution for issue #1 * Create mutations_ljsauer.py * Revert "Solution for issue #1" This reverts commit 3907bbd.
- Loading branch information
1 parent
45e1662
commit 568e927
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
Challenge: Write a function that returns True if the first string in a list | ||
contains all of the letters of the second string in the list. | ||
Examples: | ||
["hello", "hey"] | ||
should return false because the string "hello" does not contain a "y". | ||
["alien", "line"] | ||
should return true because all of the letters in "line" are present in "Alien". | ||
""" | ||
|
||
def all_there(): | ||
|
||
print("This function takes two words as input and checks to see if " + | ||
"all the letters in Word 2 are in Word 1.") | ||
|
||
strings = input("Enter two words, separated by a comma (no spaces): ").lower().split(',') | ||
word1 = strings[0] | ||
word2 = strings[1] | ||
|
||
print("You entered,", word1, " and", word2) | ||
|
||
for i in word2: | ||
if i in word1: | ||
return True | ||
else: | ||
return False |