>>> for i in range(len(a)):
        if i == 0:
                b.append(a[i])
        if a[i]!=b[-1]:
                b.append(a[i])

This one seems work, but looks clumsy,

Thanks for any suggestions that helps to improve.

Best regards,
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to