
There are in all 35 reserved words called as keywords in Python Programming Language.
- False
- True
- None
- await
- and
- as
- assert
- async
- class
- continue
- def
- del
- else
- elif
- except
- finally
- for
- from
- import
- pass
- break
- if
- in
- is
- lambda
- global
- or
- raise
- return
- try
- nonlocal
- while
- not
- with
- yield
Note: Reserved keywords cannot be used as identifiers and you should spell them exactly the same or else they may not work and you will get syntax errors!
Example:#keyword is False and not lowercase false
my_bool = false
if(my_bool is False):
print("It is False")
Output:
NameError: name 'false' is not defined
Soft Keywords (introduced in 3.10)
Soft keywords are identified that are reserved only in certain contexts like pattern-matching.
- match
- case
- _
More Posts related to Python,
- How to Install Python Modules in VS Code
- 3 Python program to add two numbers
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python]
- Python: How to get Current Directory
- Python - Convert float to String
- Tkinter - add x and y padding to label text
- Check if String Contains a Substring - Python
- Read JSON File in Python Program
- How to Convert String to DateTime in Python
- Sorting an array using Bubble Sort in Python Programming
- Python Hello World! Program with code example (snippet)
- How to delete a dir or folder using Python code
- Change label (text) color in tkinter
- Set width and height for the label in tkinter
- Check version of pip package installer for Python
- Reading JSON file in Python with Examples
- Indent Python code in Notepad++
- tkinter - Hello World! Program
- How to resolve Failed to create interpreter PyCharm Error
- Base64 Encoding Decoding in Python Programming
- How to pip install Python Modules in VSCode
- How to take user input from the console in a Python program
- Take input argument from command line in Python Programming
- Python Program To Calculate Simple Interest (SimpleInterest.py)
- Calculate discount amount python code
More Posts:
- JavaScript: Count Words in a String - JavaScript
- List of 60 useful FTP Client Commands to access server - FTP
- Spell check not working in Gmail : Mac OS X - Mac-OS-X
- MySQL Error :1007 SQLSTATE: HY000 (ER_DB_CREATE_EXISTS) Message: Can't create database '%s'; database exists - MySQL
- Add imports in eclipse shortcut key combinations - Eclipse
- Disable jQuery button after being click - jQuery
- Install specific JRE on Ubuntu using apt - Ubuntu
- Parsing CSV file using Java code example (Comma Separated File) - Java