How can I separate a string irregardless of upper or lower case?
line = 'Thing Replaces OtherThing'
before, sep, after = line.partition(' replaces ')
print(before)
print(after)
I expect the output to be "Thing" and "OtherThing".
Edit: I also need it to work with no spaces in the string
line = 'ThingReplacesOtherThing'
before, sep, after = line.partition('replaces')