title: Count the unique elements in an array with effective way
body: <p>I can't release something better than: (Python 3.6)</p>
  
  <pre><code>N=int(input()) #count of input elements
  a=[] #buffer
  k=0 #counter
  tel=0 #next number
  for i in range(N):
      tel=int(input())
      if(not tel in a):
          a.append(tel)
          k+=1
  print(k) #count of unique elements
  </code></pre>
  
  <p>But my teacher says that my solution is not very effective, coz I save data to array <code>a</code>... </p>
  
  <p>Hm... He also says that I should save something in variable and permanently rewrite it.</p>
  
  <p>Have You any idea un this case?</p>
  
  <p><strong>UPD</strong></p>
  
  <p>"Effective way" - program must uses as little memory as possible, and works fast as possible</p>