• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Programming Expert

Solving All of Your Programming Headaches

  • HTML
  • JavaScript
  • jQuery
  • PHP
  • Python
  • SAS
  • Ruby
  • About
You are here: Home / Python / Find Maximum of Three Numbers in Python

Find Maximum of Three Numbers in Python

June 26, 2022 Leave a Comment

To find the maximum of three numbers in Python, the easiest way is to use the Python max() function.

a = 5
b = 10
c = 15

print(max(a,b,c))

#Output
15

If you have the three numbers in a list, you can pass the list to max() and get the maximum value.

If you have the three numbers in a list, you can pass the list to max() and get the maximum value.

To get the maximum value of a list of numbers in Python, we use the max() function.

list_of_numbers = [10,32,98,38,47,34]

print(max(list_of_numbers))

#Output
98

Hopefully this article has been useful for you to learn how to use the Python max() function to get the maximum of three numbers.

Other Articles You'll Also Like:

  • 1.  How to Serialize a Model Object with a List of Lists Using Django Rest Framework in Python
  • 2.  Reverse Words in a String Python
  • 3.  PROC MEANS Equivalent in Python
  • 4.  Using Python to Get Domain from URL
  • 5.  How to Convert pandas Column dtype from Object to Category
  • 6.  Using Python to Sort Two Lists Together
  • 7.  Python Check if Dictionary Value is Empty
  • 8.  rfind Python – Find Last Occurrence of Substring in String
  • 9.  How to Iterate over Everything in Word Document using python-docx
  • 10.  Flatten List of Tuples in Python

About The Programming Expert

The Programming Expert is a compilation of a programmer’s findings in the world of software development, website creation, and automation of processes.

Programming allows us to create amazing applications which make our work more efficient, repeatable and accurate.

At the end of the day, we want to be able to just push a button and let the code do it’s magic.

You can read more about us on our about page.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

About The Programming Expert

the programming expert main image

Welcome to The Programming Expert. We are a group of US-based programming professionals who have helped companies build, maintain, and improve everything from simple websites to large-scale projects.

We built The Programming Expert to help you solve your programming problems with useful coding methods and functions in various programming languages.

Search

Learn Coding from Experts on Udemy

Looking to boost your skills and learn how to become a programming expert?

Check out the links below to view Udemy courses for learning to program in the following languages:

Copyright © 2023 · The Programming Expert · About · Privacy Policy