• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
May 23, 2022 |46.9K Views
Python Program to Find the Largest Number in a List
  Share  5 Likes
Description
Discussion

In this video, we are going to see 3 different approaches to finding the largest number in a list in Python.

Approach:

1) Initialize a max variable with the first element of the list and traverse
the whole list and simultaneously update the max variable.
2) Sorting the list places the largest number in the last position, we can sort the list using sort() methods.
3) Using the max() method which returns the maximums number in the list.

Python program to find the largest number in a list: https://www.geeksforgeeks.org/python-program-to-find-largest-number-in-a-list/

Read More