Using a variable as both an integer and a string (Python)
<p>I would like to use a variable as an integer and a string in the same statement. In BASIC, it would look like this:</p>

<pre><code>cnt = 0

while cnt &lt; 10:
    cnt = cnt + 1
    print cnt + " + 1 = " + cnt + 1 
</code></pre>

<p>I understand it's a bit different with Python (integers have to be converted before you print them as strings, but here using a function such as "cnt = str(cnt)" doesn't seem to work very well). What would be the easy way to do this?</p>
