Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Displaying values
Variables
The print function
14. Printing multiple values
List basics
Summary

Instruction

Good job! Alternatively, you can use print() with commas instead of pluses to avoid converting numbers with the str() function:

future_age = 30
print('Tomorrow, I will be',future_age,'!')

When you use commas in print(), Python will automatically add a space between each element. This is usually very convenient, but can sometimes produce unwanted results. For instance, the code above will show:

Tomorrow, I will be 30 !

Note that there is a space between the number 30 and the exclamation mark, which is incorrect according to punctuation rules. In such cases, use the plus operator to gain more fine-grain control over your output.

Exercise

Which language would you like to learn after mastering Python? You can see our proposition in the Code editor. Using the variable next_lang, print the following text:

Next, I will learn R

If you want, you can change the name of the language you intend to learn next.