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

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


Python is actually turning the integer 1 into a string before printing, and that's why the concatenation works: Python does know how to concatenate two strings.
Python is actually turning the integer 1 into a string before printing, and that's why that concatenation works: Python does know how to concatenate two strings.


We can convert an integer into a string ourselves, using the <code>str</code> function:
We can convert an integer into a string ourselves, using the <code>str</code> function: