Identify valid Identifier:
(A) My.var (B) _GLOBAL (C) for (D) While
Answers
Answered by
0
Valid operators:
_GLOBAL, While.
Explanation:
While choosing an identifier make sure that:
- It doesn't has first letter as a number or a special character other than underscore ( _ ) like: 2NUM=15, My.var=15 etc.
- It doesn't has any special character within like j@mes=15
- It must not have any space like: var name=15
- It mustn't be any keyword from python keywords list like for= 15 etc.
If you want to know the keyword list in python run the following:
import keyword
print( keyword.kwlist)
Similar questions