Sreenivas Reddy Thatiparthy <thatiparthysreenivas at gmail.com> writes: > How about this one liner, if you prefer them; > set([(k,yourList.count(k)) for k in yourList]) That has a rather bad efficiency problem if the list is large.