max function

Syntax

  • float max(a, b)

Parameters

  1. afloat or string
    b must have the same type.
  2. bfloat or string
    a must have the same type.

Returns

Returns maximum of a and b.

Description

The max function finds the maximum of a and b. It also works if a and b are strings.

Related

Examples

example.1
	max(10, -10)
	# result = 10
example.2
	max("abc", "def")
	# result = "def"

In this topic