what do you mean by keywords in python. write the name of four keywords of python.
Answers
Answer:
Keywords are the reserved words in Python.
We cannot use a keyword as a variable name, function name or any other identifier. They are used to define the syntax and structure of the Python language.
In Python, keywords are case sensitive.
There are 33 keywords in Python 3.7. This number can vary slightly in the course of time.
Eg: None,False,bool etc.
Hope it helps!
Please mark the brainliest
Keywords are words that carry out a specified task. They're also known as 'reserved' words in Python programming.
Keywords cannot be used as a variable name, it will result in an error otherwise.
A keyword is usually highlighted in orange.
Examples:
- if
- or
- and
- in
To see the whole keyword list, the following codes should do the trick.
>>> import keyword
>>> print(keyword.kwlist)
Output:
['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']
All the words in square brackets above are keywords.