title: Operation on list and lists inside a dictionary
body: <p>I have some data which is basically in the form of lists and I want to calculate the standard deviation. </p>
  
  <ol>
  <li><p>I have calculated the mean values of the data arrays and placed them in a separate list. Now to calculate the standard deviation, I am required to subtract first mean value from all the data points in the first list, take a square, and so on.</p></li>
  <li><p>For the second mean value, the same operation should be performed on the second list in the dictionary and similarly for the last value as well.</p></li>
  <li><p>These operations should give me a list with three elements corresponding to the standard deviation with respective mean values.</p></li>
  </ol>
  
  <p>Here is a code I tried to implement but this code gives me nine values because it iterates through all three lists for each mean value but I want to iterate through the first list for the first mean value, the second list for the second mean value and so on. what changes do I need to make it work as I desire?   </p>
  
  <pre><code>mean = [3,4,8]
  
  data = {'a': [1,3,5], 
          'b': [2,4,6], 
          'c': [7,8,9]
         }
  
  std_variation = []
  for element in mean:
      variation = 0
      for value in data.values():
          for inner_element in value:
              variation += (inner_element - element)**2
          variation = variation/(len(value)-1)
          std_variation.append(round(variation,2)**0.5)
  print(output)
  </code></pre>