Variable...

 # Variable is containor which stores a value.
# datatype is the type of data
# variable name only starts with a alphabet or _ . Can't take white spaces inside var.

a = 30           # int
_b = "Akash"      # str
c3 = 21.21        # float
d = 3+3j         # complex
e = True         # bool
f = None         # none

#print the value by its var name
print(a)

# Python automatically detect datatype

print(type(a))
print(type(_b))
print(type(c3))
print(type(d))
print(type(e))
print(type(f))




No comments:

Post a Comment