Fun Python question
This commit is contained in:
18
2012-05-17-fun-python-question.html
Normal file
18
2012-05-17-fun-python-question.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!--# set var="title" value="Fun Python question" -->
|
||||
<!--# set var="date" value="May 17, 2012" -->
|
||||
|
||||
<!--# include file="include/top.html" -->
|
||||
|
||||
<p>What does this do?</p>
|
||||
|
||||
<pre><code>def func():
|
||||
print 'foo'
|
||||
return
|
||||
yield 'bar'
|
||||
|
||||
print func()
|
||||
</code></pre>
|
||||
|
||||
<p>Take a guess, then give it a try.</p>
|
||||
|
||||
<!--# include file="include/bottom.html" -->
|
||||
Reference in New Issue
Block a user