Maximum Value in Python

Level 119 keystrokes

This prints the maximum value among multiple numbers. The max() function returns the largest argument.

Python code

# max() returns the largest of its arguments, separated by commas
# Of 3, 7 and 2 the largest is 7, so 7 is printed
1print(max(3, 7, 2))

Output

7
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this Python code and how often they appear.

  • ,× 2
  • (× 2
  • )× 2

More Python examples at level 1

← Python typing practice