What are Keywords in Python?

Python has a set of reserved words called keywords. These words have predefined meanings and are used to define the syntax and structure of Python code. As of Python 3.11, there are total 36 keywords.

Or in Python, keywords are special reserved words that have specific meanings and purposes in the language. They are used to define the syntax and structure of Python programs. You cannot use keywords as variable names because they are part of the Python language itself.

Note:

You cannot use keywords as variable names, function names, or identifiers because they are reserved by Python.

Example:

class = "Math"     # ❌ Invalid: 'class' is a keyword
if = 10            # ❌ Invalid: 'if' is a keyword

Explanation:

In the example above, class and if are Python keywords used for class definitions and conditional statements. Using them as variable names will cause a syntax error.

List of Python Keywords

Keywords in Python
False await else import pass
None break except in raise
True class finally is return
and continue for lambda try
as def from nonlocal while
assert del global not with
async elif if or yield
match case  

Summary:

  • Python keywords are predefined, reserved words with special meanings.
  • You cannot use them as variable names.
  • They are essential for defining logic, conditions, functions, loops, classes, and more.

Welcome to ShikshaSanchar!

ShikshaSanchar is a simple and helpful learning platform made for students who feel stressed by exams, assignments, or confusing topics. Here, you can study with clarity and confidence.

Here, learning is made simple. Notes are written in easy English, filled with clear theory, code examples, outputs, and real-life explanations — designed especially for students like you who want to understand, not just memorize.

Whether you’re from school, college, or someone learning out of curiosity — this site is for you. We’re here to help you in your exams, daily studies, and even to build a strong base for your future.

Each note on this platform is carefully prepared to suit all levels — beginner to advanced. You’ll find topics explained step by step, just like a good teacher would do in class. And the best part? You can study at your pace, anytime, anywhere.

Happy Learning! – Team ShikshaSanchar