title: Python creating nested lists
body: <p>I am working on a program that will take lists and return a list with nested lists of adjacent identical values. For example an input list of </p>
  
  <pre><code>[1,2,4,5,5,7,6,6,6] 
  </code></pre>
  
  <p>would return </p>
  
  <pre><code>[1,2,4,[5,5],7,[6,6,6]]
  </code></pre>
  
  <p>How would i go about programming a function to do this?</p>