snipt

Ctrl+h for KB shortcuts
Notice: Snipt is moving away from free accounts on May 1st, 2014. Read more about the transition here.
#59650

Python

String Methods: Four Methods to the Madness

1
2
3
4
5
6
"""Assign the variable parrot on line 4,
then call len() on parrot on line 5!"""

parrot = "Norwegian Blue"
print len(parrot)
print 
https://snipt.net/embed/9978412c9031b443a74cbb50cdb174bc/
https://snipt.net/raw/9978412c9031b443a74cbb50cdb174bc/
9978412c9031b443a74cbb50cdb174bc
python
Python
6
2014-04-21T17:18:55
True
False
Apr 20, 2013 at 07:06 PM
/api/public/snipt/59650/
string-methods-four-methods-to-the-madness
<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> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="sd">&quot;&quot;&quot;Assign the variable parrot on line 4,</span> </span><span id="L-2"><a name="L-2"></a><span class="sd">then call len() on parrot on line 5!&quot;&quot;&quot;</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="n">parrot</span> <span class="o">=</span> <span class="s">&quot;Norwegian Blue&quot;</span> </span><span id="L-5"><a name="L-5"></a><span class="k">print</span> <span class="nb">len</span><span class="p">(</span><span class="n">parrot</span><span class="p">)</span> </span><span id="L-6"><a name="L-6"></a><span class="k">print</span> </span></pre></div> </td></tr></table>
programming, python, string
#30794

Text only

Great programming font

Meslo LG S DZ
https://snipt.net/embed/e7fe078f06465b37ee1e3214c36d1e69/
https://snipt.net/raw/e7fe078f06465b37ee1e3214c36d1e69/
e7fe078f06465b37ee1e3214c36d1e69
text
Text only
1
2014-04-23T17:51:20
True
False
/api/public/snipt/30794/
great-programming-font
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Meslo LG S DZ </span></pre></div> </td></tr></table>
font, programming