Easy Tutorial
❮ Python String Isspace Ref Set Add ❯

Python math.e Constant

Python math Module

The math.e constant in Python is used to return Euler's number (2.7182...).

Syntax

The syntax for the math.e constant is as follows:

math.e

Return Value

It returns a floating-point number 2.718281828459045, representing the mathematical constant e.

Example

The following example returns Euler's number (2.7182...):

Example

# Import math package
import math

# Print the value of e
print(math.e)

Output result:

2.718281828459045

Python math Module

❮ Python String Isspace Ref Set Add ❯