Boston Python Workshop 3/Friday/Tutorial: Difference between revisions

Content added Content deleted
imported>Jesstess
imported>Jesstess
Line 228: Line 228:
</pre>
</pre>


There's another useful function that works on strings called <code>len</code>. <code>len</code> returns the length of a string:
Printing different data types together

<pre>
string = "Hello"
len(string)
print len("triskaidekaphobia")
length = len("")
print length
</pre>

How about printing different data types together?


<pre>
<pre>