title: Select a random element from an array
body: <p>I am trying to select a random element from my array.</p>
  
  <p>However, sometimes I am getting an index out of bounds error, even though I accounted for the array starting at 0 by adding 1 to the maximum value of the index.</p>
  
  <pre><code>from random import randint
  
  names = ['Sam', 'Paul', 'Mark', 'Simon', 'Sean', 'Samantha', 'Ellen']
  random_name = names[randint(0, len(array)+1)]
  
  print(random_name)
  </code></pre>
  
  <p>I only get an index out of bounds error sometimes?</p>