title: TypeError: ‘type’ object is not subscriptable
body: <p>I’m trying to get the function below to run. However I’m getting an error saying</p>
  <pre><code>TypeError: ‘type’ object is not subscriptable 
  
  
  
  
  def dist(loc1: tuple[float], loc2: tuple[float]) -&gt; float:
      dx = loc1[0] - loc2[0]
      dy = loc1[1] - loc2[1]
      return (dx**2 + dy**2)**0.5
  </code></pre>