snipt

Ctrl+h for KB shortcuts

Python 3

hork

1
2
3
def hork(derp):
    for breed in ("poodle", "terrier", "beagle"):
        yield breed * derp
https://snipt.net/embed/20020b393edd5664fdac71217ad2f57c/
/raw/20020b393edd5664fdac71217ad2f57c/
20020b393edd5664fdac71217ad2f57c
python3
Python 3
3
2019-08-13T19:40:04
True
False
False
/api/public/snipt/26883/
hork
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">def</span> <span class="nf">hork</span><span class="p">(</span><span class="n">derp</span><span class="p">):</span> </span><span id="L-2"><a name="L-2"></a> <span class="k">for</span> <span class="n">breed</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">&quot;poodle&quot;</span><span class="p">,</span> <span class="s2">&quot;terrier&quot;</span><span class="p">,</span> <span class="s2">&quot;beagle&quot;</span><span class="p">):</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">yield</span> <span class="n">breed</span> <span class="o">*</span> <span class="n">derp</span> </span></pre></div> </td></tr></table>
testing