Python: Why dosent this work?
<p>So i have this small piece of code which just wont work:</p>

<pre><code> while c&lt;b:
     str2 += str1[c]
     c+=1

print str2
</code></pre>

<p>b is the length of str1 that i want to copy to str2, and c is the point which i want to begin transfer from str1, then the while loop is just supposed to transfer all the characters from str1 to str2.</p>

<p>For some reason i can't seem to print str2 and get this error message:</p>

<p>"NameError: name 'str2' is not defined"</p>

<p>My guess is that I'm just doing something simple wrong, I just began experimenting with Python and have only really done C# before.</p>
