Search found 1 match

by wired_devil
Wed May 07, 2014 12:28 am
Forum: Challenges Solved
Topic: Lorem Ipsum
Replies: 34
Views: 3781

This is what i did, also this code works for others challenges... a = open('lorem.txt').read().replace('.', '').replace(',', '').replace('\n', '').replace('\r', '').replace(':', '') y = a.split() l = {} for k in y: if l.has_key(k): l.update({k: l[k]+1}) else: l.update({k: 1}) print sorted(l.items(),...