# How to get Euler's Number in Python

## Table of Contents

Euler's number is one of the most important numbers in all of Mathematics.

Python is a popular programming language when it comes to math and processing data.

These two combined means that you'll need to be able to get the Euler's number to use it in your Python code.

In this post, we'll learn the many ways you get the Euler's number in Python.

## Using the math module

The easiest way to get the Euler's number is to use the `math`

module that you can import in your Python code.

```
PYTHONfrom math import e
print(e)
```

```
BASH2.718281828459045
```

Because we are relying on the `math`

module, we can be assured that the Euler's number will be accurate.

## Using math.exp()

Also using the `math`

module, we can use the function `exp()`

to get the Euler's number.

This function takes in a parameter which is the power to which the Euler's number is raised.

Because we know any number raised to the power of `1`

is itself, we can use this to get the Euler's number.

```
PYTHONfrom math
print(exp(1))
```

```
BASH2.718281828459045
```

## Conclusion

In this post, we explored how you can use the `math`

module in two different ways to get the Euler's number.

Hopefully, you've found this useful to you when you're writing Python code.

Thanks for reading!

- Getting Started with Express
- Git Tutorial: Learn how to use Version Control
- How to Scrape the Web using Node.js and Puppeteer
- Getting User Location using JavaScript's Geolocation API
- Getting Started with Moment.js
- Learn how to build a Slack Bot using Node.js
- Creating a Twitter bot with Node.js
- Setting Up Stylus CSS Preprocessor
- Getting Started with Vuex: Managing State in Vue
- Using Axios to Pull Data from a REST API
- How To Create a Modal Popup Box with CSS and JavaScript
- Getting Started with Moon.js