Chapter 10: Variables

In this chapter, we will learn how to declare multiple variables in a single line. In the example, languageΒ is a string, and chapter is a number. Since we can't directly add a string and a number, we need to convert chapter into a string before combining them.

Β 

language,chapter = "python",10

print("This is the " + str(chapter) + "th chapter of " + language + " language.")

Output: This is the 10th chapter of python language.