title: Does a Python strip() on a split() string do anything?
body: <p>Based on some experiments, it appears to me that the following Python v2.7 code:</p>
  
  <pre><code>def lookup_pattern(pattern, file_containing_patterns):
    for line in file_containing_patterns:
      splits = line.split()
      if splits:
        if (pattern == splits[0]):
          return map(lambda x: x.strip(), splits[1:])
    return None
  </code></pre>
  
  <p>Could be simplified as follows to drop the <code>map</code> of <code>strip()</code>:</p>
  
  <pre><code>def lookup_pattern(pattern, file_containing_patterns):
    for line in file_containing_patterns:
      splits = line.split()
      if splits:
        if (pattern == splits[0]):
          return splits[1:]
    return None
  </code></pre>
  
  <p>I believe this is true because the <code>split()</code> should remove all white space and thus the <code>strip()</code> would be a no-op.</p>
  
  <p>Are there any cases where in the above two are not identical in effect, if so, what are they?</p>