find the index of minimum element in a list python

# function to find minimum and maximum position in list
def minimum(a, n):
  
    # inbuilt function to find the position of minimum 
    minpos = a.index(min(a))
      
    # inbuilt function to find the position of maximum 
    maxpos = a.index(max(a)) 
      
    # printing the position 
    print "The maximum is at position", maxpos + 1  
    print "The minimum is at position", minpos + 1

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
how to find the minimum element in a list starting from particular index how to find the minimum element in a list from particular index how to find minimum index in list python how to get minimum value in list python with index Python get index of min in list find the index of the min value in a list python python minimum index of list find the index of the minimum value in an array python python find minimum index in array find index of min in list python python index of minimum element index of minimum value in list python get index of minimum value in list python how to find the index of the minimum value in an array python find the index of minimum in python how to get index of smallest item in list python find minimum value and index in list python python find the minimum value in a list with its index position of minimum lement list python get index of min value in list python index of minimum element python python find index of min item in list how to get the index of the min value in a list python find position of minimum value in array python how to find index of smallest element in list python python get index of minimum value in list how to find index of min value in list python python index of min element in list python find index of min element in list get index of minimum value python find position of minimum value in list python how to get the index of the minimum value in a list python python find minimum in list index findign the index of min element in a list python find minimum value index in list python how to get the index of the minimum in a list get the index of the minimum value in a list python find index of min value in list python python find index of minimum in list how to find the index of the minimum value in a list minimum index of an array in python find index of minimum value in list python find the index of minimum element in a list python
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source