human
Python - How to cut a string in Python?
assistant
Here is some code to cut a string using delimiter '&'

s[:s.rfind('&')]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.