while(n<len(list1)):
if list1[n][0:4]==str(Y) and list[n][5:7]==str(M):
break
else:
n=n+1
list1[n][0:4]的确是str类型的,这是怎么回事?
TypeError: There are no type variables left in list是什么意思?
结果:
while(n<len(list1)):
if list1[n][0:4]==str(Y) and list[n][5:7]==str(M):
break
else:
n=n+1
list1[n][0:4]的确是str类型的,这是怎么回事?
TypeError: There are no type variables left in list是什么意思?
结果:
改之前:if list1[n][0:4]==str(Y) and list[n][5:7]==str(M):
改之后: if list1[n][0:4]==str(Y) and list1[n][5:7]==str(M):