Guys, if you really tried programming in python, some times you would have received unexpected results/error with some of the variable names. If you are in a ‘IDE’ it may show the problematic variable name as soon as you type , how-ever if you are not in ide, you fail..
Is there any way to list ‘default’ keywords defined in python ?
Yes, here it is :
>>>>import keyword
>>> keyword.kwlist
['and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'with', 'yield']
Now you know !