I have a list of integer imported via a file
xy = [50, 2, 34, 6, 4, 3, 1, 5, 2]
I am aware of Python: finding lowest integer
However, I wonder how can I print the position of it instead of just finding the smallest number?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just use the
list.indexmethod:If the minimum is repeated, you’ll only get the index of the first occurrence, though.