Largest Number

Description:

Python Program to Find the Largest Number in a List. Input : First Line: Number Of Elements in the list Second Line: Elements of the List Output : Prints the largest element of the list Test Case 1 Input (stdin) 3 23 567 3 Expected Output 567 Test Case 2 Input (stdin) 4 34 56 24 54 Expected Output 56

Program :

  • n=int(input())
    a=input().split()
    a.sort()
    print(a[-1])