title: Getting a Syntax Error: if len(sys.argv) =! 5 no clue why the code is wrong
body: <p>Hello I'm working on my first python script and I've got a </p>
  
  <blockquote>
    <p>Syntax Error: if len(sys.argv) =! 5::</p>
  </blockquote>
  
  <p>I really have no clue what is causing it. I'm using Python v3.3.3 in Wing IDE 5.0 on a windows box. It's my first script but I do know other programming languages so I don't care if the answer is difficult to understand. It's probably a noobish error.. Does it maybe have something to do with the new syntax?</p>
  
  <pre><code>import shodan
  import requests
  import sys 
  
  SHODAN_API_KEY = "ENTER API KEY IN HERE"
  api = shodan.Shodan(SHODAN_API_KEY)
  iptotal = ('IP list')
  pagenmbr = 1
  if __name__ == "__main__":
          if len(sys.argv) =! 5:
                  print('Usage: &lt;query&gt; &lt;username&gt; &lt;password&gt; &lt;lastpagenumber')
                  sys.exit(0)
  
                  query = sys.argv[1]
                  username = sys.argv[2]
                  password = sys.argv[3]
                  endpage = sys.argv[4]
                  iteratePage(pagenmbr)
  
  
  
                  def iteratePage(pagenmbr):
                          try:
                                 ...
  
                          except (shodan.APIError, e):
                                  print ('Error: %s' % e)  
  
  pagenmbr = pagenmbr + 1
  
  if pagenmbr &lt;= endpage:
          iteratePage(pagenmbr)
  
  print(iptotal)
  #Append succeeded items to file
  with open("outputsbb.txt", "a") as myfile:
          myfile.write(iptotal)
  </code></pre>
  
  <p>I left out the try commands to save some space. If anybody has had this error before or could help me with this plz reply and help a fellow coder out it's really appreciated </p>