0
2.6kviews
Write a python program to find the largest element in the list.
1 Answer
written 2.5 years ago by |
Explanation:-
Code:-
def max(l):
maximum = l[ 0 ]
for a in l:
if a > maximum:
maximum = a
print("The largest no in the list",maximum)
l= []
ele=0
n = int(input("Enter number of elements : "))
for i in range(0, n):
print("Enter elements for the list:")
ele = int(input())
l.append(ele)
print(l)
max(l)
Output:-