Variable in Python



Variable is a named piece of Memory that can store a value.

Usage :-
  • Compute an expression’s result.
  • Store that result into a variable.
  • And use that variable later in the program.

Now let us see how to store a value in a variable.

Syntax:

name = value

Examples:

x = 5

gba = 3.14

A variable that has given a value can be used in expression.

X + 4 is 9



2 thoughts on “Variable in Python

Leave a comment