Keywords in Python
Keywords in Python
They are the words used by Python interpreter to recognize the structure of program. As these words have specific meaning for interpreter, they cannot be used for any other purpose.
A partial list of keywords in Python 2.7 is
and | del | from | not |
while | as | elif | global |
or | with | assert | else |
if | pass | yield | break |
except | import | print | class |
exec | in | raise | continue |
finally | is | return | def |
for | lambda | try |
Qus. 1 : Which of the following is not a keyword ?
- eval
- nonlocal
- assert
- finally
- val
- raise
- try
- with
- ca$h
- marks10
- Python2Shar
- 31 characters
- 63 characters
- No limit but 79 characters for better redability
- All of the above.
- 32
- 33
- 31
- 30
- in
- is
- assert
- All
- raise
- try
- val
- with
- 33
- 45
- 35
- 30
- 32
- 64
- 35
- 29
Programs
python program to input a welcome message and print it
python program to print number of seconds in year
Python program to calculate GST Goods and Service Tax
python program to find the ASCII Value of entered character
python program that display a joke but display the punch line only when the user presses enter key
python program to generate the following output 5 10 9
python program to print 5@10@9