/ Published in: Python
Expand |
Embed | Plain Text
def gen_tags(tags): words = {} for x in (' '.join(tags)).split(): words[x] = 1 + words.get(x, 0) return ' '.join([('<font size="%d">%s</font>'%(min(1+p*5/max(words.values()), 5), x)) for (x, p) in words.items()])
You need to login to post a comment.
