list1=[汽车服务+深圳国资改革+珠宝,深圳国资改革+珠宝]
def cut_off(): list2 = [] for str1 in list1: for x in range(0, str1.count('+') + 1): if str1.count('+') != 0: tist2.append(str1[:str1.find('+')]) str1 = str1[str1.find('+') + 1:] else: tist2.append(str1)
list1=[汽车服务+深圳国资改革+珠宝,深圳国资改革+珠宝]
def cut_off(): list2 = [] for str1 in list1: for x in range(0, str1.count('+') + 1): if str1.count('+') != 0: tist2.append(str1[:str1.find('+')]) str1 = str1[str1.find('+') + 1:] else: tist2.append(str1)