After sending the last email, I was more and more unsatisfied with it&#39;s level of detail I provided.<br><br>Your original statement:<br><br>b=b,r<br><br>was doing nothing like you intended. The comma operator in this instance is making a tuple. 
The name b was being reassigned to the new tuple created by the comma operator.<br><br>b+=&quot;,&quot; + r <br><br>Was not doing exactly what I said. What it&#39;s doing is creating a new string from the one named by b, the string literal &quot;,&quot; , and the one named by r. After creating the string it assigns the name b to the new string.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --michael<br clear="all"><br>-- <br>Michael Langford<br>Phone: 404-386-0495<br>Consulting: <a href="http://www.TierOneDesign.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.TierOneDesign.com/
</a>
<br><br><div><span class="gmail_quote">On 10/15/07, <b class="gmail_sendername">Michael Langford</b> &lt;<a href="mailto:mlangford.cs03@gtalumni.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
mlangford.cs03@gtalumni.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Use <br>b+=&quot;,&quot;+r <br>instead. That will add the , to the string named by b, and will concatenate the string named by r to the end.<br><br>&nbsp;&nbsp; --Michael<br><span><br>-- <br>Michael Langford<br>Phone: 404-386-0495
<br>Consulting: 
<a href="http://www.TierOneDesign.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.TierOneDesign.com/</a>
</span><div><span><br><br><div><span class="gmail_quote">On 10/15/07, <b class="gmail_sendername"><a href="mailto:ddm2@sfu.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ddm2@sfu.ca</a></b> &lt;<a href="mailto:ddm2@sfu.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ddm2@sfu.ca</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


Hi,<br><br>I&#39;m new to Python, and found some problems on the internet that would be a<br>good start to begin. The problem I have is that my conversion program (which<br>currently only converts unsigned integers) also prints all these brackets
<br>and commas. Here is my code and the result:<br>CODE:<br>print &quot;&quot;<br>print &quot;--------------------&quot;<br>print &quot;Unsigned Binary&quot;<br>print &quot;--------------------&quot;<br>print &quot;&quot;
<br>n = int(raw_input(&quot;Please enter an integer: &quot;))<br>b = &#39;&#39;<br>while n &gt; 0:<br>&nbsp;&nbsp;&nbsp;&nbsp;r = n%2<br>&nbsp;&nbsp;&nbsp;&nbsp;n = n/2<br>&nbsp;&nbsp;&nbsp;&nbsp;b = r,b<br>print b<br><br>(ex: n = 15)<br>RESULT:<br>(1, (1, (1, (1, &#39;&#39;))))<br>


<br>I think the problem is in the line of code &#39;b = r,b&#39;, but am not sure how to<br>fix it. The tip given for the problem says I should &#39;append&#39; r to b, but<br>since b is not a list, &#39;b = r,b&#39; was the only thing that came to my mind.
<br><br>Thanks in advance.<br>_______________________________________________<br>Tutor maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Tutor@python.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Tutor@python.org
</a><br><a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.python.org/mailman/listinfo/tutor
</a><br></blockquote></div><br>
</span></div></blockquote></div><br>