# Python string problem

**URL:** <https://forum.codewithmosh.com/t/python-string-problem/19412>\
**Category:** Python\
**Created:** [April 6, 2023, 3:35pm UTC](https://forum.codewithmosh.com/t/python-string-problem/19412 "2023-04-06T15:35:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhanurajpoot](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bhanurajpoot](https://forum.codewithmosh.com/u/bhanurajpoot)\
**Post date:** [April 6, 2023, 3:35pm UTC](https://forum.codewithmosh.com/t/python-string-problem/19412/1 "2023-04-06T15:35:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bhanurajpoot](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bhanurajpoot](https://forum.codewithmosh.com/u/bhanurajpoot)\
**Post date:** [April 6, 2023, 3:38pm UTC](https://forum.codewithmosh.com/t/python-string-problem/19412/2 "2023-04-06T15:38:26Z")

</div>

![WhatsApp Image 2023-03-16 at 9.24.51 AM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/4/41214a707247ef66708a57569a221deb96a12362.jpeg)

---

<div class="post-metadata">

**Author:** ![markaldo](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@markaldo](https://forum.codewithmosh.com/u/markaldo)\
**Post date:** [October 16, 2023, 5:43am UTC](https://forum.codewithmosh.com/t/python-string-problem/19412/3 "2023-10-16T05:43:34Z")

</div>

Check this one…[Python String Operations](https://net-informations.com/python/basics/string.htm)
