Run
# list a=[18, 52, 23, 41, 32] # sort the list, default is in ascending order a.sort() # largest number is the last item in the sorted list ln = a[-1] # print the largest number print("Largest element is: ",ln)
Output