title: TypeError: must be str, not int; Python
body: <p>I've been trying to write a code for Fibonacci using memorization on Python. </p>
  
  <p>Here's my code</p>
  
  <pre><code>def fib(n, memo):
      if memo[n] is not None:
          return memo[n]
      if n == 1 or n == 2:
          result = 1
      else:
          result = fib_2(n-1, memo) + fib_2(n-2, memo)
  
  memo[n] = result
  return result
  
  def fib_memo(n):
      memo = [None] * (n + 1)
      return fib(n, memo)
  
  t = input("number ")
  
  print(fib_memo(t))
  </code></pre>
  
  <p>It returns:- </p>
  
  <blockquote>
    <p>TypeError: must be str, not int" on line 17- memo = [None] * (n + 1)</p>
  </blockquote>
  
  <p>I can't seem to understand the issue here.</p>