Size: 305
Editor: anonymous
|
Size: 345
Editor: anonymous
|
Deletions are marked like this. |
Additions are marked like this. |
Line 1: |
Line 1: |
#acl AdminGroup:read,write |
#acl AdminGroup:read,write EditorGroup:read,write All:read |
Line 3: |
Line 3: |
{{{ |
{{{#!python |
1 d,l,s={},[],[]
2 l=file('test.txt').read().split()
3 for word in l:
4 d[word]=l.count(word)
5 for word, count in d.items():
6 s.append([count, word])
7 s.sort()
8 for count, word in s:
9 print word, count
LehreWiki: SiaExercisesLesson1LoesungListenStrings (last edited 2008-04-14 13:48:51 by PaulLamp)