Basics of python
How to declare variables?
Rule for declaring variables
- The first character of the variable can be an alphabet or (_) underscore.
- Special characters (@, #, %, ^, &, *) should not be used in variable name.
- Variable names are case sensitive. For example – “Number” and “NUMBER” are two different variables.
- Reserve words or keywords cannot be declared as variables.
Correct format:
we can assign our variables like Name,NAME, Name1, NAME2, _Name, name,New_name, etc.,
Incorrect format:
we cannot assign our variables like @name, #name, *name, $name, 1name, also reserve words like List, True, Is, in, False etc,.