<div class="gmail_quote">On Sat, Jan 9, 2010 at 11:56 AM, Gary Herron <span dir="ltr"><<a href="mailto:gherron@islandtraining.com">gherron@islandtraining.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Victor Subervi wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi;<br>
I have a string.join statement on a variable that comes from a cgi.FieldStorage().getlist. The variable may be a list or a single value. I need to treat it differently depending on which it is. How can I distinguish it? len(var) will obviously give me the length of the string if it's a string and the length of the list if it's a list.<br>

TIA,<br>
beno<br>
</blockquote>
<br></div>
Like this:<br>
<br>
if isinstance(var, list):<br>
 ... join ...<br>
else:<br>
 ... ??? ...<br></blockquote><div><br>Right.. Thanks!<br>beno<br>
</div></div>