I have a list for exemple:
a = [ 9,6,5,4,1,0,0,7,6] .
By this function I want to delete all element which content zero and delete all element which content duplicate.
But it doesn’t do exact what I want.
def rensa(a,b): j=0 for i in a: if a[j]<= 0: del a[j] elif a[j]==a[j+1]: del a[j+1] j+=1 print a return a,b