title: How to get a row from a file that starts with multiple prefixes
body: <p>I'm trying to get the rows that starts with 's1', 's2'. Below is the code. </p>
  
  <pre><code>import os
  
  f = open("test.csv","r")
  lines = f.readlines()
  f.close()
  
  f = open("test.csv","w")
  for line in lines:
   if (line.startsWith("s1") ||  line.startsWith("s2")) 
        f.write(line)
  f.close()
  </code></pre>
  
  <p>When I run this script I'm getting syntax error near '||'. 
  I looked into this link  and made changes accordingly - 
  <a href="https://stackoverflow.com/questions/9790584/how-to-check-if-a-string-starts-with-one-of-several-prefixes">How to check if a string starts with one of several prefixes?</a></p>
  
  <p>Please let me know if I'm doing anything wrong.
  FYI, I'm using Python 2.7.</p>
  
  <p>Thanks!</p>