Recent Posts
None | 11 sec ago
None | 14 sec ago
None | 43 sec ago
None | 47 sec ago
C | 1 min ago
C | 1 min ago
None | 1 min ago
Python | 1 min ago
None | 1 min ago
None | 1 min ago
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Anonymous on the 9th of Feb 2010 11:12:49 PM
Download |
Raw |
Embed |
Report
def sortData(fileName):
rawData = open(fileName+'.txt')
a = []
b = []
for k in range(20):
b.append(0)
for m in range(5):
a.append(b)
#for l in rawData:
# x = l.split()
# #print(z)
# for i in x:
# a[1][int(i)] = a[1][int(i)]+1
# #print(a)
# print a
#z = z+1
for l in rawData:
x = l.split()
for i in x:
b[int(i)] = b[int(i)] + 1
for j in range(20):
a[0][j] = b[j]
z = (z+1)
return a
print sortData("U2Fans")
Submit a correction or amendment below.
[ previous version ] | [ difference ] | Make A New Post