bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Python/Foundations
Python•Foundations

Python Output Numbers

Print Numbers

You can also use the print() function to display numbers:

However, unlike text, we don't put numbers inside quotes:

Example

print(3)

print(358)

print(50000)

You can also do math inside the print() function:

Example

print(3 + 3)

print(2 * 5)

Mix Text and Numbers

You can combine text and numbers in one output by separating them with a comma:

Example

print("I am", 35, "years old.")

You will learn more about combining text and variables in the Python Variables and Python Strings chapters.

Previous

Python Output / Print

Next

Python Comments