Anonymous user
Rosetta Code/Rank languages by popularity: Difference between revisions
Rosetta Code/Rank languages by popularity (view source)
Revision as of 12:26, 20 February 2009
, 15 years ago→{{header|Python}}
Line 47:
<lang python>import urllib, re
a = urllib.urlopen("http://www.rosettacode.org/w/index.php?title=Special:Categories&limit=500")
entries = []
for line in a:
match = re.search('>([^<>]*)</a> \((\d+) members?\)', line)
Line 62 ⟶ 58:
a.close()
for c, line in enumerate(sorted(entries, key=
print "%3d. %s" % (c, line)</lang>
|