Learn
Code Challenge: String Methods
Substring Between

substring_between_letters()

Instructions

1.

Write a function named substring_between_letters that takes a string named word, a single character named start, and another character named end. This function should return the substring between the first occurrence of start and end in word. If start or end are not in word, the function should return word.

For example, substring_between_letters("apple", "p", "e") should return "pl".

Folder Icon

Sign up to start coding

Already have an account?