Question: In this exercise, you are determing whether or not a given string is bookended by a substring. A string is bookended if the beginning characters
In this exercise, you are determing whether or not a given string is "bookended" by a substring. A string is bookended if the beginning characters of the string are the same as the ending characters. Your function should return the largest bookend from any given string. We'll call this function bookends For example:
bookends should return
bookendsqq should return q
bookendsabcqwertyabc should return "abc"
Starter code and tests have been provided for you.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
