Tutorialslot.com

youtube facebook twitter gmail pinterest

Variables in python


variables in python are declared once the values are assigned to the variables.No explicit declaration of variables are needed so that we can save memory space. Assigning values to variables is done by using equal(=) sign.

Example:
n = 100 # integer
m = 1000.0 # floating point
st = "tutorialslot" # string

print (n)
print (m)
print (st)

Multiple Assignment:
Python allows you to assign a single value to several variables simultaneously. For example -

a = b = c = 1



Advertisement Powered By Google Adsense






IF YOU LIKE THIS TUTORIALS PLEASE SHARE

Share on whatsapp

POPULAR TAGS

python python tutorial learn python learning python python code learning java python language python documentation python tutor python basics python download python online python for dummies how to learn python