title: simple python loop that makes a new line once it reads a new value
body: <p>I am new to python. I am trying to apply a loop over a sorted list. the idea is whenever the loop reads a new value different from the previous one it makes a new line before it (the editor I am using is jupyter notebook)
  what I've tried is </p>
  
  <pre><code>d=[1,1,1,2,2,3,4,5,5,5]
  for i in d:
    if i == d[i]:
       print(i)
    elif i != d[i]:
       print(i)
       print('\n')
  </code></pre>
  
  <p>The expected output should be something like this</p>
  
  <pre><code>1
  1
  1
  *new line*
  2
  2
  *new line*
  3
  *new line*
  4
  *new line*
  5
  5
  5
  </code></pre>
  
  <p>but unfortunately this code didn't do the job. Thanks for your help, I appreciate it.</p>