<div class="gmail_quote">On Fri, Apr 25, 2008 at 4:29 PM, Luis Zarrabeitia <<a href="mailto:kyrie@uh.cu">kyrie@uh.cu</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Whats the result of using id.strip()?:<br><br>In [1]: " asdfasdf   ".strip()<br>Out[1]: 'asdfasdf'<br>
<br>It should work, I guess...</blockquote>
<div> </div>
<div>It didnīt for some reason. That was the first thing I tried.</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span><br><br>Btw, you can write your code without using len in a cleaner way:<br><br>try:<br>
 if id[0] == ' ':<br>   id = id[1:]   # Note this slice notation...<br>except:<br> pass<br><br>try:<br> if id[-1] == ' ':   # id[-1] would be the last character<br>   id = id[:-1]      # Again, a slice with only one argument<br>
except:<br> pass</blockquote>
<div> </div>
<div>Oh, yeah. Forgot about that. Thanks!</div>
<div>Victor</div></div>