title: Problem with minimum and maximum inside function (Python)
body: <p>everyone, I wrote this code and can't understand how to add minimum and maximum of sequence in return. I tried min(sequence) and other things. Nothing is working. Please, help.</p>
  <pre><code>MONTHS = 4
  def main():
    precip = [0] * MONTHS
    print(func(precip))
    
  def func(sequence):
    total = 0
    
    for count in sequence:
      count = int(input('Quantity: '))
      total += count
      average = total/len(sequence)
    return  total, average
    
  main()
  </code></pre>
  <p>I found this code but i don't understand how to put it inside mine.</p>
  <pre><code>lst = [1, 0, 3, 6, -5, 7]
   
  mins = lst[0]
  for i in lst:
      if i &lt; mins:
          mins = i
          
  print(mins)    
  </code></pre>