17 Program to get the largest number of a list using Python

Program:

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

large = l[0]

for i in l:
    if large <= i:
        large = i

print("Largest Number is: ",large)


Output:

Program to get the largest number of a list using Python

Previous
Next Post »