Variables in Python
• What is Variable:
A variable is just the name of the variable a value. Variable point to the memory location where data is read and modified.
• Variable in Python:
1. Python Variable Must begin with a letter (a-z, A-Z) or underscore(_).
2. Python Variables should be characters like letters, numbers or (_) underscore.
3. Python Variables are Case Sensitive.
4. Python Variables can be any reasonable length.
5. Python Variable must not be reserved word or keyword.
6. The variable names should be written in camelCase.
Example:
>>>x=”python”
>>>y=10
>>>print(x)
>>>print(y)
Output:
Python
10
No comments:
Post a Comment