Jul-24-2017, 05:04 PM
I have resolved it so:
list_ = ['did', 'is', 'not', 'come', 'will', 'kill', 'are', 'not'] for x in list_: if x == 'not': something = list_.index(x) -1 newelem = list_[one] + ' not' list_.pop(one) list_.remove(x) list_.insert(one, newelem) print(list_)