Menu
Coddy logo textTech

Animal Crackers

Lesson 4 of 12 in Coddy's Python Interview Series course.

challenge icon

Challenge

Easy

Write 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 here

All lessons in Python Interview Series