fork download
  1.  
  2.  
  3. lista=[19, 3, 2, 6, 7, 8, 5]
  4.  
  5.  
  6. def min(values):
  7. smallest = None
  8. for value in values:
  9. if smallest is None or value < smallest:
  10. smallest = value
  11. return smallest
  12.  
  13.  
  14. menorvalor=min(lista)
  15. print("o menor valor é:")
  16. print(menorvalor)
Success #stdin #stdout 0.03s 9344KB
stdin
Standard input is empty
stdout
o menor valor é:
2