-
Printing output in python 2 :- print "argument that you want to print"
-
mathematical operators :- x = 8 y = 4 print x+y # it wil give outout of sum of x and y print x-y # it will give difference of x and y print x/y # it will give quotient when x is divided by y print x%y # it is modulo function and gives remainder when x is divied by y print x ** y # it means x^y. it is way to represnt power operator
-
single line comments can be given by putting # before a line
-
multi line comments can be given by putting 3 double quotes befire and after the lines.
example of putting multiline comments is : """ hello how are you """
- To validate a variable to be an integer or a string, use 'isinstance(, )' it accepts two parameter
- variable name
- Type to be validated example: isinstance(a, dict) , isinstance(num, integer) It return True if true else false.