Write a Python Program to find the maximum of a list of numbers

In this program you can find the maximum of a list of numbers using Python language. It’s a very simple program

Concepts Involved

A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

This is less like the for keyword in other programming languages, and works more like an iterator method as found in other object-orientated programming languages.

With the for loop we can execute a set of statements, once for each item in a list, tuple, set etc.

For loop

Sort list alphanumerically

List objects have a sort() method that will sort the list alphanumerically, ascending, by default.

Script

Output

Output

Algorithm For The Program

Step1: Start

Step2: Take in the number of elements and store it in a variable.

Step3: Take in the elements of list one by one.

Step4: Sort the list in ascending order.

Step5: Print the last element of the list.

Step6: Stop.

To know more about Python check at GUVI: