In python some words are reserved to represent some meaning or functionality.Such type of words are called Reserved words.
There are 33 words are available in Python
true
There are 33 words are available in Python
- True,False,None
- and,or, not,is
- if, elif, else
- while,for,break,continue,return,in ,yield
- try,except,finally,raise,assert
- import,from,as,class,def,pass,global,nonlocal,lemda,del,with
Note:
- All reserved word in Python contain only alphabet symbols.
- Except the following three reserved words, all contain only lower case alphabet symbol
- True
- False
- None
a = True
>>> import keyword
>>> keyword.kwlist
['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
No comments:
Post a Comment