Skip to content

Commit 97d3031

Browse files
committed
Day 5: True if first two letters of string is equal
1 parent ac0c150 commit 97d3031

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

daily_challenges/day_5/__init__.py

Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Write a function takes a two-word string and returns True if both words begin with same letter
3+
"""
4+
5+
6+
def animal_crackers(input_string):
7+
input_list = input_string.lower().split(' ')
8+
if input_list[0][0] == input_list[1][0]:
9+
return True
10+
return False
11+
12+
13+
print(animal_crackers('Crazy Chocolate'))
14+
print(animal_crackers('Lazy Dog'))

0 commit comments

Comments
 (0)