Identifier is the name given to entities like class, functions, variables etc. in Python. It helps differentiating one entity from another.An identifier starts with a letter A to Z or a to z or an underscore (_) followed by zero or more letters, underscores and digits (0 to 9).
Python doesn’t  allow  punctuation characters such as %,$ and @ within identifiers.It is a case sensitive language.
Rules for writing identifiers in Python:-
*Â First character must be a letter or underscore ( _ ).
*Â Starting an identifier with a single leading underscore indicates by convention that the identifier is meant to be private.
*Â Starting an identifier with two leading underscores indicates a strongly private identifier.
*Â Any additional character can be a letter or underscore.
*Â Case sensitive.(always mind it)
*Â It can begin with a number also.
*Â Identifier can be of any length.
You must be logged in to post a comment.