What is a Variable in Python? | Definition and Example Program

 What is Variables in Python ?

  • Variable are containers used to store the data values.
  • They allow for storing, modifying and accessing the data with code.

Now explore how to variables work and how to use them effectively in essential.


Variables in python with a Simple Addition Example :

Program :


Output :



 Variables Case sensitivity :
  •   Variables are case sensitivity because a and A are treated as different variables.

Program:



Output:



Python Allowed and Not Allowed Variables names:

Allowed Variables Names :

  • my_variables
  • myVariables
  • My_Variables1

Not Allowed Variables Names :

  • _my_variables
  • my-variables
  • my varaiables

Post a Comment

0 Comments