Python program: Write a program to print the largest number from a list

Python program: Write a program to print the largest number from a list

list_items = [11,42,30,4,95,67,7]
largest_item = 0

for i in list_items:
    if(i >= largest_item):
        largest_item = i

print(largest_item)

Output: 95

Post a Comment

0 Comments