Animal Crackers
Lesson 4 of 12 in Coddy's Python Interview Series course.
Challenge
EasyWrite a function animal_crackers which takes a two-word string, and returns True if both words begin with the same letter
a1- string
And outputs a boolean, which is either True or False
Example:
Input - Crazy Chocolate
Expected Output - True
Explanation - Both words of string start with same character
Try it yourself
def animal_crackers(a1):
# Write code hereAll lessons in Python Interview Series
1Crack Python Coding Interview
Lesser of two evensPangram Unique ElementsAnimal CrackersSpy GameMatching StringPalindrome or NotBlackJackFind DuplicatesEncodeHash 33First Non-Repeating Character