55. Python Program to find the Second Smallest of the given numbers.
How does this program work?
- In this program we are going to learn about how to find the second smallest of the given numbers using Python.
Here is the code
a = list()
number = int(input("Enter the number of elements you want:"))
print ('Enter numbers in array: ')
for i in range(int(number)):
n = input("number : ")
a.append(int(n))
a.sort()
#To convert given elements in ascending order
temp = 0
temp=a[1]
print(a) #To print array elements in sorting order
print("Second smallest number: ",a[1])