This is a basic program in python. The following is the program for getting all the 35 keywords available for python.
The Keywords available in python are :
True, False, None
and, or, is, not
if, elif, else
for, while, break, continue, in , yeild, return
try, catch, finally, raise, assert, async, await
import, from, as, class, def, global, nonlocal, pass, lambda, del, with
Program :
import keyword
keywords = keyword.kwlist
print("The No. of keywords : ", len(keywords))
print("Keywords are : ", end=" ")
for i in keywords:
print(i, end=", ")
Output :
The No. of keywords : 35 Keywords are : 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
Comments
Post a Comment