[Tutor] Tutor Digest, Vol 76, Issue 31

Alan Gauld alan.gauld at btinternet.com
Sat Jun 12 22:12:48 CEST 2010


Please do not send the entire digest when replying rto a single
email. Use your editor to remove the redundant material.

--------------------
"saurabh agrawal" <imsam100 at yahoo.co.in> wrote

You can use method name count in list also for getting the repeats.

#!/usr/bin/python

li=[1,2,3,1,4,5,7,3,4,1]
for i in range(len(li)):
print li[i], li.count(li[i])

cheers,

Saurabh



--- On Fri, 11/6/10, tutor-request at python.org 
<tutor-request at python.org> wrote:

From: tutor-request at python.org <tutor-request at python.org>
Subject: Tutor Digest, Vol 76, Issue 31
To: tutor at python.org
Date: Friday, 11 June, 2010, 8:19 PM

... 




More information about the Tutor mailing list