Why is there a space in sys.argv[]?
<pre><code>argc = len(sys.argv)

if (argc &lt; 3 or argc &gt; 5):
    printusage()
    sys.exit()

insensitive = 1 if ("-i" in sys.argv) else 0
boundaries = 1 if ("-b" in sys.argv) else 0

filename = sys.argv[argc-2]
str = sys.argv[argc-1]

print "Looking for '", str , "' in '" , filename , "'"
</code></pre>

<p>The output is </p>

<blockquote>
  <p>python count_words.py -b -i football.txt goal</p>
  
  <p>Looking for ' goal ' in ' football.txt '</p>
</blockquote>

<p>Why is there a space before and after 'goal' and 'football.txt' ? When I try to print the <em>str</em> and <em>filename</em> variable by themselves, they don't have these spaces. </p>

<p>I've also tried using str.strip() in the print, but to no effect.</p>

<p>Any ideas?</p>
