I am writing a program that receives a specific amount of values, and returns the lowest value in the list and its position. It is as follows:
quantidade = int(raw_input())
numeros = raw_input()
NumerosNaLista = numeros.split()
if len(NumerosNaLista) == quantidade:
MenorValor = min(NumerosNaLista)
print "Menor valor:", MenorValor
I tried to use find
to find the position of the lowest value in NumerosNaLista
, but it does not work. How to proceed?