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

imported>Jesstess
imported>Jesstess
Line 228:
</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>
 
PrintingHow about printing different data types together?
 
<pre>
Anonymous user