[Tutor] matmolplot

2010-06-01 Thread saurabh agrawal
Hi, I am trying to make plot using following code:---#!/usr/bin/pythonimport numpy as npimport matplotlib.pyplot as pltimport stringfrom pylab import savefigfrom sys import argv #input file as first argumentf1=argv[1]f = open(f1,'r')line=f.readlines()f.close() f2 = f1.split(".")#f3 = f2[

Re: [Tutor] Tutor Digest, Vol 76, Issue 31

2010-06-12 Thread saurabh agrawal
Hi, 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-requ...@python.org wrote: From: tutor-requ...@python.org Subject: Tutor