addition of int and str
<p>hello i am reading this python book and one of the exercises says:</p>

<blockquote>
  <p>Write a function named right_justify that takes a string named s as a parameter and prints the string with enough leading spaces so that the last letter of the string is in column 70 of the display.</p>
</blockquote>

<p>ok so i have the following code that prints 70 spaces and the string 'allen'</p>

<pre><code>def right_justify(s):
    print s
right_justify(' ' * 70 + 'Allen')
</code></pre>

<p>but when i try to subtract the number of spaces from the string 'Allen'</p>

<pre><code>sub = len('allen')
def right_justify(s):
    print s
right_justify(' ' * 70 - sub + 'Allen')
</code></pre>

<p>i get:</p>

<blockquote>
  <p>"unsupported operand type(s) for -: 'str' and 'int'"</p>
</blockquote>

<p>why does it work without the sub variable and it doesn't with it? 
I have checked the type of the sub and it comes out as an int.</p>
