BTW, GMail brings up some interesting sponsored links when the subject line<br>has string.strip in it ( :-0) <br><br><div><span class="gmail_quote">On 9/30/07, <b class="gmail_sendername">Alan Gauld</b> &lt;<a href="mailto:alan.gauld@btinternet.com">
alan.gauld@btinternet.com</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;"><br>&quot;wesley chun&quot; &lt;<a href="mailto:wescpy@gmail.com">
wescpy@gmail.com</a>&gt; wrote in message<br>news:78b3a9580709300102x12cbe392uebb988ed965c7202@mail.gmail.com...<br>&gt;&gt; &gt; I&#39;m not sure how to proceed.&nbsp;&nbsp;My biggest stumbling<br>&gt;&gt; &gt; block is how to detect the leading and trailing
<br>&gt;&gt; &gt; whitespace.<br>&gt;&gt;<br>&gt;&gt; Use indexing.<br>&gt;&gt; Try using a while loop.<br>&gt;&gt; Or maybe two?<br>&gt;&gt;<br>&gt;&gt; And strings have an isspace method...<br>&gt;<br>&gt; unfortunately, the isspace() string method only returns True if all
<br>&gt; chars in the string are whitespace chars and False otherwise, so<br>&gt; that&#39;s a bummer.<br><br>But the string can be one character long:<br><br>s = &#39;fred\n&#39;<br>print s[-1].isspace()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# --&gt; True
<br><br>:-)<br><br>Alan G<br><br><br>_______________________________________________<br>Tutor maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Tutor@python.org">Tutor@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/tutor">
http://mail.python.org/mailman/listinfo/tutor</a><br></blockquote></div><br>