I want to do something like this:
>>> mystring = \"foo\" >>> print(mid(mystring))
Help!
There are built-in functions in Python for "right" and "left", if you are looking for a boolean result.
str = "this_is_a_test" left = str.startswith("this") print(left) > True right = str.endswith("test") print(right) > True