Python program to print the largest number in the array using for loop

Python program to print the largest number in the array using for loop. Program to print the largest element in array using for loop in python. In the Python programming language, the largest element in an array program. This software will assist you in determining the array’s largest number. In Python, print the largest number by checking each element in the array.

arr = [200,56,765,34,566]; 
max = arr[0]; 
for i in range(0, len(arr)): 
if(arr[i] > max): 
max = arr[i]; 
print("Largest element is" + str(max)); 

Output:

Largest element is765