title: How efficient is this Python Code for the fibonacci sequence?
body: <p>I wrote this a few days ago and it seems to be working fine, but it is slow. It took 25 seconds to generate the 1 millionth number in the fibonacci sequence. Is there a way to make this more efficient?</p>
  
  <pre><code>def main():
      num1 = 0
      num2 = 1
      var = 0
      num = int(raw_input("What fibonacci number do you want to know? "))
      while 1:
          num3 = num1
          num1 = num1 + num2
          num2 = num3
          var+=1
          if var&gt;=num:
              print num3
              return main()
          else:
              None
  
  main()
  </code></pre>
  
  <p>Note that I am a beginner in python, so I won't understand advanced concepts</p>