data types and variables in python

variables in python

variables are like containers that are created to hold or store data. This data storage is temporary
, meaning the data remains until the program executes.

syntax:

variable_name=value

example:

a=34.5
print(a)





data types in python

when we use any kind of data in any programming language, that data could have some type of data. These are some standard types of data in python:

text: string

numeric: integer, float, complex

booleans: bool(True or False)

collections: set,list,tuple,dict

NoneType: NoneType



string:

a="hello world of python"


integer:

a=10


float(decimal value):

a=4.5


booleans:

a=True


None Type:

a=None



0 Comments