python
wget http://pydelicious.googlecode.com/files/pydelicious-0.5.0.zip unzip pydelicious-0.5.0.zip cd pydelicious-0.5.0 python setup.py install>>> import pydelicious >>> pydelicious.get_popular(tag='programing')集合知プログラミング作者: Toby S…
>>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. R…
>>> a = [1, 2, 3, 4, 5] >>> a [1, 2, 3, 4, 5] >>> [item for item in a if item < 3] [1, 2] >>> filter(lambda(n): n < 3, a) [1, 2] >>>
>>> def square(n): ... return n**2 ... >>> a = [1, 2, 3] >>> a [1, 2, 3] >>> [square(item) for item in a] [1, 4, 9] >>> map(square, a) [1, 4, 9] >>>
>>> def hoge(): ... return 1 ... >>> hoge <function hoge at 0x829f0> >>> hoge() 1 >>> fuga = hoge >>> fuga <function hoge at 0x829f0> >>> fuga() 1 >>></function></function>