title: How to randomly select a specific sequence from a list?
body: <p>I have a list of hours starting from (0 is midnight).</p>
  
  <pre><code>hour = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
  </code></pre>
  
  <p>I want to generate a sequence of 3 consecutive hours randomly. Example: </p>
  
  <pre><code>[3,6]
  </code></pre>
  
  <p>or </p>
  
  <pre><code>[15, 18]
  </code></pre>
  
  <p>or </p>
  
  <pre><code>[23,2]
  </code></pre>
  
  <p>and so on. random.sample does not achieve what I want!</p>
  
  <pre><code>import random    
  hourSequence = sorted(random.sample(range(1,24), 2))
  </code></pre>
  
  <p>Any suggestions?</p>