Loading...
PythonUncategorized

Python Identifiers

1. Alphabet Symbols(Either Upper case or Lower case).
Eg: total100

2. If identifier starts with underscore ‘_’ then it is indicated as private.
Eg: _sum

3. If it starts with ‘__'(two underscores symbols) then it is indicated as strongly private identifier.
Eg: __sum

4. If the identifier starts and ends with two underscore symbols then it is language defined special name, which is also know as magic methods.
Eg: sum

5. Identifiers should not start with digits.

6. Identifiers are case sensitive.

7. We cannot use reserved words as identifiers.

8. There is no length limit for Python identifiers. But it is not recommended to use too lengthy identifiers.

9. Dollar ($) symbol is not allowed in python.

Leave a Reply

Your email address will not be published. Required fields are marked *