1.

Python Variables

Answer»

Variables are names given to data items that may take on one or more values during a program’s runtime.
Following are the variable naming conventions in python:


  • It cannot begin with a number.

  • It must be a single word.

  • It must consist of letters and _ symbols only.

  • Variables in Python which start with _ (underscore) are considered as “Unuseful”.

Some examples are shown below:

>>> variable_name = "Hello"
>>> variable_name
'Hello'
>>> variableName = 123
>>> variableName
123


Discussion

No Comment Found