def del_nt(title_list): title_new = [] for title_old in title_list: title = re.sub('\s', '', title_old) if title == '': pass else: title_new.append(title) return title_new