title: Why this insertion sort algorithm outputs None?
body: <pre><code>def insertion_sort(list):
      for index in range(1,len(list)):
          value = list[index]
          i = index - 1
          while i&gt;=0:
              if value &lt; list[i]:
                  list[i+1] = list[i]
                  list[i] = value
                  i = i - 1
              else:
                  break
  
  a = [7,1,3,5,9,2,3]
  
  print(insertion_sort(a))
  </code></pre>
  
  <p>This code is taken from a <a href="https://www.youtube.com/watch?v=lEA31vHiry4" rel="nofollow noreferrer">Khan Academy video</a>. However, when I try to run it myself both on Jupyter Notebook and IDLE it outputs None. I can't figure out why when it's exactly the same from the video.
  Thanks in advance for helping.</p>