s = 'abc.zip.blech'
"""""".join(s.partition('.zip')[0:2])
s = 'abc.zip'
"""""".join(s.partition('.zip')[0:2])
s = 'abc.py'
"""""".join(s.partition('.zip')[0:2])
How to delete everything after a certain character in a string?