SyntaxFix
Write A Post
Hire A Developer
Questions
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