title: 'int' object is not subscriptable in python
body: <p>enemy_pos = [random.randint(0, int(Width)), 0]</p>
  <p>this is my list and where I try to run this following function it says: 'int' object is not subscriptable</p>
  <p>the function:</p>
  <pre class="lang-py prettyprint-override"><code>def detect_collision(player_pos, enemy_pos):
  
      p_x = player_pos[0]
      p_y = player_pos[1]
      e_x = enemy_pos[0]
      e_y = enemy_pos[1]
  
      if (p_x &lt;= e_x &lt; (p_x + 50)) or (e_x &lt;= p_x &lt; (e_x + 50)):
          if (p_y &lt;= e_y &lt; (p_y + 50)) or (e_y &lt;= p_y &lt; (e_y + 50)):
              return True
      return False
  </code></pre>
  <p>The problem happens at the <code>e_x = enemy_pos[0]</code> line.</p>