title: How to calculate the percentage of each element in a list?
body: <p>I have this list with 5 sequence of numbers: </p>
  
  <pre><code>['123', '134', '234', '214', '223'] 
  </code></pre>
  
  <p>and I want to obtain the percentage of each number <code>1, 2, 3, 4</code> in the <code>ith</code> position of each sequence of numbers. For example, the numbers at <code>0th</code> position of this <code>5</code> sequences of numbers are <code>1 1 2 2 2</code>, then I need to calculate the percentage of 
  <code>1, 2, 3, 4</code> in this sequence of numbers and return the percentage as <code>0th</code> element of a new list.</p>
  
  <pre><code>['123', '134', '234', '214', '223']
  
  0th position: 1 1 2 2 2   the percentage of 1,2,3,4 are respectively: [0.4, 0.6, 0.0, 0.0]
  
  1th position: 2 3 3 1 2   the percentage of 1,2,3,4 are respectively: [0.2, 0.4, 0.4, 0.0]
  
  2th position: 3 4 4 4 3   the percentage of 1,2,3,4 are respectively: [0.0, 0.0, 0.4, 0.6]]
  </code></pre>
  
  <p>Then desired result is to return:</p>
  
  <pre><code>[[0.4, 0.6, 0.0, 0.0], [0.2, 0.4, 0.4, 0.0], [0.0, 0.0, 0.4, 0.6]]
  </code></pre>
  
  <p>My attempt so far:</p>
  
  <pre><code>list(zip(*['123', '134', '234', '214', '223']))
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code> [('1', '1', '2', '2', '2'), ('2', '3', '3', '1', '2'), ('3', '4', '4', '4', '3')]
  </code></pre>
  
  <p>But I got stuck here, then I don't know how to calculate the percentage of the element of each numbers of <code>1, 2, 3, 4</code>, then obtain the desired result. Any suggestion is appreciated!</p>