How to Add Two Numbers in Python

How to Add Two Numbers in Python

Learn how to add two numbers in Python.


Use the + operator to add two numbers:

Example

Try it Yourself »


Add Two Numbers with User Input

In this example, the user must input two numbers. Then we print the sum by calculating (adding) the two numbers:

Example

ArmenianEnglish