Posted By

u1ik on 10/07/08


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

atr000
pipitu


Tag cloud


 / Published in: Python
 

  1. def gen_tags(tags):
  2. words = {}
  3. for x in (' '.join(tags)).split():
  4. words[x] = 1 + words.get(x, 0)
  5. return ' '.join([('<font size="%d">%s</font>'%(min(1+p*5/max(words.values()), 5), x)) for (x, p) in words.items()])

Report this snippet  

You need to login to post a comment.