How is it possible to convert in elegant way strings like:
\'test.test1.test2\' \'test.test3.test4\'
into strings like these:
Use rsplit to split from the end, limit to 1 split:
your_string.rsplit('.', 1)