Jump to content

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

imported>Jesstess
imported>Jesstess
Line 631:
 
<pre>
length = len("Mississippi")
x = type(5)
</pre>
 
Running this assigns the typelength of <code>5</code>the --string an"Mississippi" integerto --the tovariable <code>xlength</code>.
 
We can write our own functions to encapsulate bits of useful work so we can reuse them. Here's how you do it:
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.