• 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
  • VBA
  • 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.  Truncate Decimal from Number with Python math.trunc() Function
  • 2.  Python Check if Attribute Exists in Object with hasattr() Function
  • 3.  List of Turtle Shapes in Python
  • 4.  Drop Duplicates pandas – Remove Duplicate Rows in DataFrame
  • 5.  Intersection of Two Lists in Python
  • 6.  Find All Pythagorean Triples in a Range using Python
  • 7.  How to Check if Number is Power of 2 in Python
  • 8.  Pythagorean Theorem in Python – Calculating Length of Triangle Sides
  • 9.  Using Python to Print Plus or Minus Sign Symbol
  • 10.  Using Python to Get Queue Size

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

The Programming Expert is a compilation of hundreds of code snippets to help you find solutions to your problems in Python, JavaScript, PHP, HTML, SAS, and more.

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 © 2022 · The Programming Expert · About · Privacy Policy