title: "TypeError: 'type' object is not subscriptable" in a function signature
body: <p>Why am I receiving this error when I run this code?</p>
  <pre><code>Traceback (most recent call last):                                                                                                                                                  
    File &quot;main.py&quot;, line 13, in &lt;module&gt;                                                                                                                                              
      def twoSum(self, nums: list[int], target: int) -&gt; list[int]:                                                                                                                    
  TypeError: 'type' object is not subscriptable
  </code></pre>
  <pre><code>nums = [4,5,6,7,8,9]
  target = 13
  
  def twoSum(self, nums: list[int], target: int) -&gt; list[int]:
          dictionary = {}
          answer = []
   
          for i in range(len(nums)):
              secondNumber = target-nums[i]
              if(secondNumber in dictionary.keys()):
                  secondIndex = nums.index(secondNumber)
                  if(i != secondIndex):
                      return sorted([i, secondIndex])
                  
              dictionary.update({nums[i]: i})
  
  print(twoSum(nums, target))
  </code></pre>