|
程序1:
List=['b','b','d','b','c','a','a']
List.sort()
last = List[-1]
for i in range(len(List)-2, -1, -1):
if last==List:
del List
else:
last=List
print List
程序2:
List=['b','b','d','b','c','a','a']
List.sort()
first=List[0]
for i in range(1,len(List),1):
print List
if first==List:
del List
else:
first=List
print List
|
|