18 Program to get the smallest number from a list using Python

Program:

l = list()

l = [int(x) for x in input("Enter any 5 value: ").split()]



small = l[0]



for i in l:

    if small >= i:

        small = i



print("Smallest Number is: ",small)


Output:


Previous
Next Post »