Python reserved keywords are the words to represent some meaningful function (which having fixed functionality)
Example :- Apple, Banana => these are reserved words to represent fruits.
Keywords in Python
What are keywords?
- Some words are reserved to represent some meaning/functionality is called as Reserved words.
- In python, Only 33 words are reserved.
- If you know these Reserved words then you can write any program in python.
- Python is very very small programming language.
Python keywords list
- True, Flase :- Boolean Type
- None :- To represent nothing such as NULL
- and, or, not, is :- Operators in python
- if, else, elif :- Conditional words
- while, for, break, continue, return, in, yeild :- Looping words
- try, except, finally, raise, assert :- Exception handling words
- import, from, as, class, def, pass, global, nonlocal, lambda, del, with
- You can always get the list of keywords in your current version by typing the following in the prompt.
- All Reserved words contains only alphabet symbols.
- Except True, False and None all the reserved words contains small letters.
a=True => valid
a=true => Invalid
a=none => Invalid
a=None => valid
a=false => Invalid
a=False => valid
Python reserved keywords program
Write program with some python reserved keyword
print("Reserved words in python")
print("Boolean Reserved keyword=",bool)
print("None Reserved keyword=",a)
Read Also –