-1

I'm trying to find the biggest number in the array while finding out what position is that value.

For example lets say the array is dicevalues=[1,2,0,12]

I'd want the output to be: The largest value is 12 in position 3

I've tried

dicevaules=[1,2,0,12]
largest-value = max(array, key=lambda x: x)
print(largest-value)

But this doesn't tell me which position of the array is the largest value.

0 Answers0