title: Fixing list out of range error. Python
body: <p>I need a random number 1 - 3 to be generated. The error I'm getting is</p>
  
  <blockquote>
    <p>IndexError: list index out of range</p>
  </blockquote>
  
  <p>My code is as follows: </p>
  
  <pre><code>weaponList = [0,1,2]
  weapon2 = weaponList[random.randint(0,3)]
  </code></pre>