Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Naming Rules | Variables
Introduction to Python | Mobile-Friendly

bookNaming Rules

There are several rules for naming variables in Python. These are the following:

  • A variable name must start with a letter or the underscore character, which means a variable name can not begin with a number.
  • A variable name may contain only English letters, numbers, and underscore characters.
  • Variables’ names are case sensitive, i.e., Chapter, chapter, and CHAPTER will be considered three different objects by Python.
question mark

Choose all the acceptable names for variables.

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 2

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Ask me questions about this topic

Summarize this chapter

Show real-world examples

Awesome!

Completion rate improved to 4

bookNaming Rules

Swipe to show menu

There are several rules for naming variables in Python. These are the following:

  • A variable name must start with a letter or the underscore character, which means a variable name can not begin with a number.
  • A variable name may contain only English letters, numbers, and underscore characters.
  • Variables’ names are case sensitive, i.e., Chapter, chapter, and CHAPTER will be considered three different objects by Python.
question mark

Choose all the acceptable names for variables.

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 2
some-alt