How to split a string defining a separator and looking from the end of
string in python?