title: TypeError: 'function' object is not subscriptable - Python
body: <p>I have this code:</p>
  <pre><code>bank_holiday= [1, 0, 1, 1, 2, 0, 0, 1, 0, 0, 0, 2] #gives the list of bank holidays in each month
      
  def bank_holiday(month):
      month -= 1 # Takes away the numbers from the months, as months start at 1 (January) not at 0. There is no 0 month.
      print(bank_holiday[month])
      
  bank_holiday(int(input(&quot;Which month would you like to check out: &quot;)))
  </code></pre>
  <p>But when I run it, I get an error that says <code>TypeError: 'function' object is not subscriptable</code>. Why?</p>