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

Content added Content deleted
imported>Jesstess
imported>Jesstess
Line 333: Line 333:
<code>m a happy camper'</code>
<code>m a happy camper'</code>


which it doesn't understand -- it's not 'valid' Python. Those letters aren't variables (we haven't assigned them to anything), and that trailing quote isn't balanced. So it raises a <code>SyntaxError</code>.
which it doesn't understand -- the quotes aren't balanced and it's not 'valid' Python. Those letters aren't variables (we haven't assigned them to anything), and that trailing quote isn't balanced. So it raises a <code>SyntaxError</code>.


We can use double quotes to avoid this problem:
We can use double quotes to avoid this problem: