This is my list
lis = [['For the first', '$7.56'], ['For the next', '$16.69'],
['For the first', '$18.34'], ['For the next', '$43.47']]
In this there will always be 2 "for the first"
and N times "for the next"
for example;-
lis = [['For the first', '$7.56'], ['For the next', '$16.69'],['for the next','$3.4'],['for the next','$2'],['For the first', '$18.34'], ['For the next', '$43.47'],[for the next,'$34']
I want to separate list into 2.
1:from 1st "for the first" to 2nd 'for the first'(not included)
2: from 2nd 'for the first'(included) to last element
delivery=[]
supply=[]
for j in range(1,len(lis)):
if(lis[j][0].lower()=='for the first'):
break
else:
delivery.append(lis[j][1])
print(delivery)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…