2009 210

From Media Design: Networked & Lens-Based wiki
Jump to navigation Jump to search

Morning

A small CGI exercise using List Comprehensions.

and of course, tutorials

Unicode

Text source:

import re
words = re.split(r"\s+", text)
words = [w for w in words if w]
# print words
# print " ".join( [w.upper().encode("utf-8") for w in words if len(w) == 4] )
print " ".join( [w.lower().encode("utf-8") for w in words if w[0] == "e"] )