<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Slick Code Tips: Python Lists can Build Lists</title>
	<atom:link href="http://www.localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/</link>
	<description>Information: It's the Magic</description>
	<pubDate>Thu, 29 Jul 2010 18:55:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ivan</title>
		<link>http://www.localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/comment-page-1/#comment-48</link>
		<dc:creator>Ivan</dc:creator>
		<pubDate>Wed, 29 Nov 2006 19:47:39 +0000</pubDate>
		<guid isPermaLink="false">http://localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/#comment-48</guid>
		<description>I believe this construct you outline is called a list comprehension in Python.</description>
		<content:encoded><![CDATA[<p>I believe this construct you outline is called a list comprehension in Python.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken-ichi</title>
		<link>http://www.localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/comment-page-1/#comment-47</link>
		<dc:creator>Ken-ichi</dc:creator>
		<pubDate>Wed, 29 Nov 2006 08:39:06 +0000</pubDate>
		<guid isPermaLink="false">http://localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/#comment-47</guid>
		<description>&lt;code lang="python"&gt;&gt;&gt;&gt; coders = [kueda, n8, k7, mangosquasher]
&gt;&gt;&gt; max(coders)
mangosquasher&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p><code lang="python">>>> coders = [kueda, n8, k7, mangosquasher]<br />
>>> max(coders)<br />
mangosquasher</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mangosquasher</title>
		<link>http://www.localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/comment-page-1/#comment-44</link>
		<dc:creator>mangosquasher</dc:creator>
		<pubDate>Wed, 29 Nov 2006 04:00:17 +0000</pubDate>
		<guid isPermaLink="false">http://localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/#comment-44</guid>
		<description>correction -- under reduce, it should be:
&#62;&#62;&#62; x = reduce(lambda x,y: x + y, range(5))

oops!</description>
		<content:encoded><![CDATA[<p>correction &#8212; under reduce, it should be:<br />
&gt;&gt;&gt; x = reduce(lambda x,y: x + y, range(5))</p>
<p>oops!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mangosquasher</title>
		<link>http://www.localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/comment-page-1/#comment-43</link>
		<dc:creator>mangosquasher</dc:creator>
		<pubDate>Wed, 29 Nov 2006 03:57:16 +0000</pubDate>
		<guid isPermaLink="false">http://localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/#comment-43</guid>
		<description>Some of my favorite python functions:

map 
&#62;&#62;&#62; z = map(len, ["abc", "clouds", "rain"])
&#62;&#62;&#62; z
[3, 6, 4]

lambda
&#62;&#62;&#62; g = lambda u:u*u
&#62;&#62;&#62; g(4)
16

filter
&#62;&#62;&#62; x = [5,12,-2,13]
&#62;&#62;&#62; y = filter(lambda z: z &#62; 0, x)
&#62;&#62;&#62; y
[5, 12, 13]

reduce
&#62;&#62;&#62; x = reduce(lambda x,y: x y, range(5))
&#62;&#62;&#62; x
10

walk
os.walk() performs recursion so you don't have to!</description>
		<content:encoded><![CDATA[<p>Some of my favorite python functions:</p>
<p>map<br />
&gt;&gt;&gt; z = map(len, ["abc", "clouds", "rain"])<br />
&gt;&gt;&gt; z<br />
[3, 6, 4]</p>
<p>lambda<br />
&gt;&gt;&gt; g = lambda u:u*u<br />
&gt;&gt;&gt; g(4)<br />
16</p>
<p>filter<br />
&gt;&gt;&gt; x = [5,12,-2,13]<br />
&gt;&gt;&gt; y = filter(lambda z: z &gt; 0, x)<br />
&gt;&gt;&gt; y<br />
[5, 12, 13]</p>
<p>reduce<br />
&gt;&gt;&gt; x = reduce(lambda x,y: x y, range(5))<br />
&gt;&gt;&gt; x<br />
10</p>
<p>walk<br />
os.walk() performs recursion so you don&#8217;t have to!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken-ichi</title>
		<link>http://www.localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/comment-page-1/#comment-42</link>
		<dc:creator>Ken-ichi</dc:creator>
		<pubDate>Wed, 29 Nov 2006 00:29:09 +0000</pubDate>
		<guid isPermaLink="false">http://localoaf.org/2006/11/28/slick-code-tips-python-lists-can-build-lists/#comment-42</guid>
		<description>Here's my &lt;a href="http://www.pageofguh.org/technicality/597" rel="nofollow"&gt;list of useful Python basics&lt;/a&gt;.  We should get n8 to install a syntax highlighting plugin...</description>
		<content:encoded><![CDATA[<p>Here&#8217;s my <a href="http://www.pageofguh.org/technicality/597" rel="nofollow">list of useful Python basics</a>.  We should get n8 to install a syntax highlighting plugin&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
