Python program to print the smallest element in an array

Python program to print the smallest element in an array. In Python programming language, print the smallest element in the array. The smallest number in the sequence will be shown by this programme. It will print the small element by confirming the value of the smaller element by testing each element in the array

arr = [100,500,700,900,1100]; 
min = arr[0]; 
for i in range(0, len(arr)): 
if(arr[i] < min): 
min = arr[i]; 
print("The smallest number is" + str(min)); 

 

Output:

Smallest element present in given array: 100