how to remove text between and using python?
If you don't want to import any modules:
string = "" string = string.split(' ') for i, s in enumerate(string): if s == '' : del string[i] print ' '.join(string)