Sep-26-2018, 02:31 PM
Explore string slicing. See what the below gives you (the literal string can be replaced by a variable).
So, you can find where the string you are looking for starts, and then slice the string to return everything before that.
"Mary had a little lamb"[:10]
So, you can find where the string you are looking for starts, and then slice the string to return everything before that.
I am trying to help you, really, even if it doesn't always seem that way