Python string problem

Given a string s, return the max path you can get to move from one letter to another identical one. If there is no such thing, return -1.

Check this one…Python String Operations