code: def pvariance(data, mu=None):
      
      if iter(data) is data:
          data = list(data)
      n = len(data)
      if n < 1:
          raise StatisticsError('pvariance requires at least one data point')
      ss = _ss(data, mu)
      return ss / n
docs: Return the population variance of ``data``.
  
      data should be an iterable of Real-valued numbers, with at least one
      value. The optional argument mu, if given, should be the mean of
      the data. If it is missing or None, the mean is automatically calculated.
  
      Use this function to calculate the variance from the entire population.
      To estimate the variance from a sample, the ``variance`` function is
      usually a better choice.
  
      If you have already calculated the mean of the data, you can pass it as
      the optional second argument to avoid recalculating it:
  
  
      This function does not check that ``mu`` is actually the mean of ``data``.
      Giving arbitrary values for ``mu`` may lead to invalid or impossible
      results.
  
      Decimals and Fractions are supported: