Python Variables

Photo by Luca Bravo on Unsplash

Python Variables

INTRODUCTION:

Hey Folks, How you doin'? HOPE u all are doing well! so I am back with another python blog Enjoy!!!

OK, so today we are going to talk about Python Variables in detail.

images (1).jfif

Variables:

Variables are containers for storing data values.

Creating Variables:

Python has no command for declaring a variable.

A variable is created the moment you first assign a value to it.

images.png

Casting:

If you want to specify the data type of a variable, this can be done with casting.

Example:

x = str(3) # x will be '3' y = int(3) # y will be 3 z = float(3) # z will be 3.0

download (1).jfif

Case-Sensitive:

Variable names are case-sensitive.

Example:

This will create two variables:

a = 4 A = "Sally".

So, guys, that's all for today hope you guys enjoyed my blog!