How to check all elements of a list are same or different

Gaurav Moghe moghegau at msu.edu
Wed Apr 15 17:36:21 EDT 2009


Hi,

I am an amateur python user I wanted to know how do I know whether all the
contents of a list are all same or all different? Now, I could certainly
write a loop with a counter. But is there a ready command for that? Checked
a lot of docs and this mailing list, but didnt get anything worthwhile.
Would be glad to know.

Thanks!
Gaurav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090415/28eae9df/attachment.html>


More information about the Python-list mailing list