In this program, we will take a user input as a list. Find the second smallest number from the list with the help of the below-given steps.
Second smallest number in a list:
Steps to solve the program
- Take a list as input.
- Sort the list using sort().
- Print the second smallest number from the list using indexing.
Output :
Related Articles
Python program to merge all elements of the list in a single entity using a special character.
Python program to get the difference between two lists.
Python program to reverse each element of the list.
Python program to combine two list elements as a sublist in a list.
Python program to get keys and values from the list of dictionaries.
Python program to get all the unique numbers in the list.