What is python variable?
Python has no command for declaring a variable.
A variable is created the moment you first assign a value to it.
What are Python variable names?
A variable can have a short name (like x and y) or a more descriptive name (age, carnage, total volume). Rules for Python variables:
- A variable name must start with a letter or the underscore character
- A variable name cannot start with a number
- A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
- Variable names are case-sensitive (age, Age and AGE are three different variables)
- A variable name cannot be any of the python keywords.
The Output will be:
No comments:
Post a Comment