# # # # # python 
# # # # # 	use cases 
# # # # # 		- web apps 
# # # # # 		- gui apps 
# # # # # 		- sceintific computing 
# # # # # 		- scripting automation 
# # # # # 	minor 
# # # # # 		- mobile apps 
# # # # # 		- testing automation
# # # # # 		- 3d designing 

# # # # # GUI apps 
# # # # # 	--> XX browser XX network XX  
# # # # # 	--> word , games , billing systems 
# # # # # 	--> py --> XXX GUI XXX 
# # # # # 	--> py + pyqt4 / py + tkinter --> gui apps

# # # # # sceintific computing
# # # # # 	-> advanced 
# # # # # 	-> advanced algorithms 
# # # # # 	-> py + libs(py ext) 
# # # # # 	-> ML / DL / AI / NN /IoT
# # # # # 	py --> extensive libs 
# # # # # 	R , --> difficult  
# # # # # 	sass , Matlab --> paid 

# # # # # scripting automation 
# # # # # 	-> devops 
# # # # # 	-> scripts (py) --> automate process 
# # # # # 	-> py + libs 
# # # # # 	-> shell , py , ruby , perl 
# # # # # 	chef --> ruby 

# # # # # installation 
# # # # # 	py3 

# # # # # linux,mac --> pre installed --> 2.7 --> upgrade 
# # # # # windows --> python.org --> py.exe 
# # # # # py --> run --> installed

# # # # # _ set path for python
# # # # # _ intall pip 

# # # # # cmd / terminal 
# # # # # installed
# # # # # c:/>python
# # # # # ----
# # # # # ----
# # # # # ----
# # # # # >>> ---> interpreter 

# # # # # c:/>python
# # # # # error 

# # # # # local installation --> one location 
# # # # # local --> global 
# # # # # writing code 
# # # # # 	cmd ---> single line XX python files XX 
# # # # # 	idle/editor  --> py files (st3)
# # # # # 	ide --> files(project) --> pycharm 

# # # # # running code
# # # # # 	cmd --> auto run 
# # # # # 	file --> cmd 
# # # # # 		c:/>python filename.py  
# # # # # 	ide --> editor + console 

# # # # # install python

# # # # # components 
	
# # # # # keywords 
# # # # # 	- pre defined 
# # # # # 	- immutable 
# # # # # 	- XX modify XX add XX delete XX
# # # # # 	py2 --> 31 
# # # # # 	py3.5 --> 33 
# # # # # 	py3.7 --> 35 
# # # # # >>>import keyword 
# # # # # >>>keyword.kwlist 
# # # # # ['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
# # # # # False None True 

# # # # # identifiers 
# # # # # 	user defined words 
# # # # # 	naming components
# # # # # 	small case ( recommended )
# # # # # 	upper case 
# # # # # 	XX start number XXX 
# # # # # 	XX start symbol XXX 
# # # # # 	_ , __ --> symbols
# # # # # 	use number 
# # # # # 	XX use symbol XX 
# # # # # 	_ 

# # # # # a , MOBILE , age , _user , __password , address2 --> valid 
# # # # # &name , name&age , 2mobile --> invalid

# # # # # variables 
# # # # # ---------
# # # # # store data 
# # # # # 	name  --> identifier
# # # # # 	value --> data 
# # # # # 	address --> location 

# # # # # <varname> = <varvalue>
# # # # # a = 10 
# # # # # id(<varname>) --> address
# # # # # type(<varname>) --> datatype

# # # # # datatypes 
# # # # # 	5 datatypes

# # # # # 	numbers 
# # # # # 	strings 

# # # # # 	lists 
# # # # # 	tuples 
# # # # # 	dictionaries 

# # # # # 	sets 
# # # # # 	frozensets 

# # # # # numbers 
# # # # # py3 --> int float complex 
# # # # # py2 --> int long float complex 

# # # # # int ---> all whole numbers --> 100 , 45 ,67, 90 ,334325
# # # # # float --> all decimal numbers --> 10.45 , 23.0 , 56.89 
# # # # # complex --> a+ib -> c+dj -> 1+2j , 200+500j 

# # # # # -----------------------------int-----------|-----------------long----------------- py2 
# # # # # -----------------------------int-----------|-----------------int------------------ py3 

# # # # # | --> max possible integer 
# # # # # >>>import sys 
# # # # # >>>sys.maxint -->py2 
# # # # # >>>sys.maxsize -->py3 
# # # # # 9223372036854775807 -> ???

# # # # # numbers --> operations 
# # # # # 	arithmetic 
# # # # # 	comparision
# # # # # 	logical 
# # # # # 	bitwise 

# # # # # membership
# # # # # identity 

# # # # # arithmetic --> 7 --> values 
# # # # # + --> add 
# # # # # - --> sub 
# # # # # * --> pro
# # # # # / --> quo 
# # # # # % --> rem 
# # # # # // --> floordiv 
# # # # # ** --> exponent 

# # # # # py3 
# # # # # 25/3 --> 8.33
# # # # # 25//3 --> 8 

# # # # # py2 
# # # # # 25/3 --> 8
# # # # # 25//3 --> 8 
# # # # # 25.0/3 --> 8.33 
# # # # # 25.0//3 --> 8

# # # # # comparision --> 6 ---> True	/ False
# # # # # > 
# # # # # < 
# # # # # >=
# # # # # <=
# # # # # ==
# # # # # !=

# # # # # logical --> 3 --> True / False / values
# # # # # and 
# # # # # or 
# # # # # not 

# # # # # ip1     ip2       ip1 and ip2 
# # # # # t        t             t 
# # # # # f        t             f 
# # # # # t        f             f 
# # # # # f        f             f 
# # # # # and --> TTT 

# # # # # ip1      ip2      ip1 or ip2 
# # # # # t         t           t 
# # # # # f         t           t 
# # # # # t         f           t 
# # # # # f         f           f 
# # # # # or --> FFF 

# # # # # not(t) --> f 
# # # # # not(f) --> t 
# # # # # 1's complement 


# # # # # 10 and 20  --> 20
# # # # # 10 or 20  --> 10
# # # # # 20 and 10  --> 10
# # # # # 20 or 10 --> 20 

# # # # # bitwise --> 6 --> values 

# # # # # bw and --> &
# # # # # bw or  --> |
# # # # # bw not --> ~ 
# # # # # right shift --> >>
# # # # # left shift --> <<
# # # # # bw xor  --> ^

# # # # # bits 
# # # # # 10 -> bits 
# # # # # 		128 64 32 16 8 4 2 1 
# # # # # 10 -->   0  0  0  0  1 0 1 0  --> 00001010
# # # # # 20 -->   0  0  0  1  0 1 0 0  --> 00010100

# # # # #  10 --> 00001010
# # # # #  20 --> 00010100
# # # # # 10|20-> 00011110 ---> 30
# # # # # 10&20-> 00000000 ---> 0 

# # # # # 15 & 23  --> 7 
# # # # # 15 | 23  --> 31
# # # # # 15 | 20  --> 31

# # # # # ~(10) --->  11110101 --> ><200
# # # # # ~(20) --->  11101011 --> ><250 

# # # # # ~ --> 2's complement

# # # # # ~x --> -(x+1)
# # # # # ~10 --> -11 
# # # # # ~25 --> -26 

# # # # # 10 >> 2 --> 00001010 >> 2 --> 00000010 ->  2 
# # # # # 10 << 2 --> 00001010 << 2 --> 00101000 -> 40 

# # # # # 23 >> 3 
# # # # # 32 << 4 
# # # # # xor --> ??? tt 
# # # # # 10 ^ 20 

# # # # # strings 
# # # # # -------
# # # # # single , group 
# # # # # alphanumeric 

# # # # # features 
# # # # # 	immutable XX modify XX delete XX add XX 
# # # # # 	indexed 
# # # # # 	sliced 
# # # # # 	concatenated 
# # # # # 	iterated 
# # # # # <class str>

# # # # # ' ' or  " "

# # # # # <strname> = "<strvalue>"

# # # # tech = "python"

# # # # # p  y  t  h  o  n 
# # # # # 0  1  2  3  4  5 --> forward indices 
# # # # # -6 -5 -4 -3 -2 -1 --> reverse indices
# # # # # print(tech)
# # # # # print(type(tech))

# # # # # <strname>[<index>]
# # # # # print(tech[2])
# # # # # print(tech[-6])
# # # # # print(tech[-3])
# # # # # print(tech[0])
# # # # # print("python"[2])

# # # # tech = "python and machine learning"
# # # # # start 
# # # # # end 

# # # # # <strname>[<sindex> : <eindex>]
# # # # # print(tech[0:3]) # 012 pyt
# # # # # print(tech[0:6]) # 012345 python
# # # # # print(tech[10:18]) # 10 11.... 17 
# # # # # print(tech[-16:-9]) # machine

# # # # # print(tech[2:12]) # 2 3 4 5 .... 11 st = 2 en = 11 step = 1 
# # # # # <strname>[<sindex> : <eindex> : <step>]
# # # # # print(tech[2:12:1])
# # # # # print(tech[2:12:2]) # 2 4 6 8 10 
# # # # # print(tech[:10])
# # # # # print(tech[10:])

# # # # # print(tech[10:2:-1])
# # # # # print(tech[:2:-1])
# # # # # print(tech[15::-1])
# # # # # print(tech[::-1]) # reverse the string 

# # # # # print(tech[::2])
# # # # # print(tech[::-2])

# # # # # del <strname>
# # # # # print(tech)
# # # # # del tech 
# # # # # print(tech)


# # # # time = "10:23:56am" #--> ???
# # # # # 10 
# # # # # 23
# # # # # 56
# # # # # print(time[:2])
# # # # # print(time[3:5])
# # # # # print(time[6:8])

# # # # # concatenation 
# # # # # -------------
# # # # # + 
# # # # # tech = "python"
# # # # # name = "khan"
# # # # # print(tech +  "    " + name)
# # # # # newvar = tech + "    " + name 
# # # # # print(newvar)

# # # # # marks = 80 
# # # # # name = "khan"
# # # # # print(name ,  "    " , marks)
# # # # # newvar = name , "    " , marks 
# # # # # print(newvar)

# # # # # string literals 
# # # # # ---------------

# # # # # a = 100 
# # # # # print(a)
# # # # # a = "python"
# # # # # print(a)

# # # # # %d --> int 
# # # # # %s --> str 
# # # # # %f --> float 

# # # # name = "khan"
# # # # marks = 80 
# # # # year = 2019

# # # # # print("%s    %d"%(name,marks))
# # # # # newvar = "%s    %d"%(name,marks)
# # # # # print(newvar)

# # # # # print("%s secured %d marks in %d "%(name,marks,year))
# # # # # newvar = "%s secured %d marks in %d "%(name,marks,year)
# # # # # print(newvar)
# # # # # print(type(newvar))

# # # # name = "khan"
# # # # marks = 80.5 
# # # # year = 2019

# # # # # khan has secured 80.5 percentage in 2019 
# # # # # khan has secured 80.5 % in 2019 

# # # # # print("%s has secured %f percentage in %d"%(name,marks,year))
# # # # # print("%s has secured %f %% in %d"%(name,marks,year))

# # # # # dia = "i'm in a class"
# # # # # print(dia)

# # # # # dia = 'i\'m in a class'
# # # # # print(dia)

# # # # # output in python
# # # # # print() --> function --> py3 
# # # # # print --> command  --> py2 
# # # # # print() --> newline 

# # # # # print(10,end="")
# # # # # print(20,end="")
# # # # # print(30)

# # # # # special chars 
# # # # # \n --> new line 
# # # # # \t --> tab space 
# # # # # para = "hdfrhb \n jkfejk\tfrekj \n doifhore \n hrgeur \n fbreug "
# # # # # print(para)

# # # # # syspath = "c\desktop\khan\technology\code\newfiles"
# # # # # print(syspath)
# # # # # syspath = "c\\desktop\\khan\\technology\\code\\newfiles"
# # # # # print(syspath)

# # # # # raw strings --> syspath , urls 
# # # # # path = r"c\desktop\khan\technology\code\newfiles"
# # # # # print(path)

# # # # # para =  "hdfrhb \n jkfejkfrekj \n doifhore \n hrgeur \n fbreug "
# # # # # print(para)

# # # # # multi line strings
# # # # # para = '''first
# # # # # second
# # # # # third 
# # # # # fourth 
# # # # # fifth 
# # # # # sixth'''
# # # # # print(para)

# # # # # comments
# # # # # ---> single line comment
# # # # # multi line comments ---> ''' ''' 
# # # # '''
# # # # first
# # # # second
# # # # third 
# # # # fourth 
# # # # fifth 
# # # # sixth
# # # # '''

# # # # # inputs in python 
# # # # # py3 
# # # # # user --> data ---> input() --> program/code 
# # # # # 10 --------------> input() --> "10"
# # # # # 10.5 ------------> input() --> "10.5"
# # # # # khan ------------> input() --> "khan"

# # # # # py2
# # # # # user --> data ---> input() --> program/code 
# # # # # 10 --------------> input() --> 10
# # # # # 10.5 ------------> input() --> 10.5
# # # # # khan ------------> input() --> "khan"

# # # # # py2
# # # # # user --> data ---> raw_input() --> program/code 
# # # # # 10 --------------> raw_input() --> "10"
# # # # # 10.5 ------------> raw_input() --> "10.5"
# # # # # khan ------------> raw_input() --> "khan"

# # # # # <varname> = input("<dia>")
# # # # # a = input("enter a number : ")
# # # # # print(a)
# # # # # print(type(a))

# # # # # name = input("enter a name : ")
# # # # # role = input("enter a role : ")
# # # # # print(name + role)

# # # # # n1 = input("enter a number 1  : ")
# # # # # n2 = input("enter a number 2  : ")
# # # # # print(n1 + n2)

# # # # # type casting ---> next class 

# # # # name = "python"
# # # # version =  3 

# # # # # print(name , version)
# # # # # print("%s  %d"%(name,version))

# # # # # convert datatype
# # # # # 	int --> str 
# # # # # 	str --> int   --> conditions 

# # # # # int() ---> string into integer (only if string is number)
# # # # # str() ---> everything into string (always)

# # # # # print(name + version)
# # # # # print(version)
# # # # # print(type(version))
# # # # # version = str(version)
# # # # # print(version)
# # # # # print(type(version))
# # # # # print(name + version)

# # # # # print(name)
# # # # # print(type(name))
# # # # # name=int(name)
# # # # # print(name)
# # # # # print(type(name))

# # # # # num = "200"
# # # # # print(num)
# # # # # print(type(num))
# # # # # num = int(num)
# # # # # print(num)
# # # # # print(type(num))

# # # # # n1 = int(input("enter a number 1 : "))
# # # # # n2 = int(input("enter a number 2 : "))

# # # # # print(n1+n2)

# # # # # enter name 
# # # # # john 
# # # # # enter marks 1 
# # # # # 30
# # # # # enter marks 2 
# # # # # 60 

# # # # # john has secured 90 marks

# # # # # name = input("enter a name : ")
# # # # # m1 = int(input("enter a marks 1 : "))
# # # # # m2 = int(input("enter a marks 2 : "))

# # # # # print("%s has secured %d marks"%(name , m1+m2))

# # # # # enter time in hh:mm:ssFF 
# # # # # 08:34:23pm 
# # # # # hours - 08 
# # # # # mins - 34 
# # # # # secs - 23 

# # # # # enter time in hh:mm:ssFF 
# # # # # 12:45:23am 
# # # # # hours - 12 
# # # # # mins - 45 
# # # # # secs - 23 

# # # # # time = input("enter time in hh:mm:ssFF : ")
# # # # # print("Hours - %s"%(time[0:2]))
# # # # # print("Mins - %s"%(time[3:5]))
# # # # # print("Secs - %s"%(time[6:8]))

# # # # # membership operators --> 2 ---> True/False 
# # # # # 	in , not in 

# # # # tech = "python and machine learning"
# # # # # print("p" in tech)
# # # # # print("P" in tech)
# # # # # print("python" in tech)
# # # # # print(" " in tech)
# # # # # print("l" in tech)
# # # # # print("an" in tech)
# # # # # print("ad" in tech)

# # # # # print("z" not in tech)
# # # # # print("python" not in tech)

# # # # # ascii 
# # # # # 	char --> one ascii	

# # # # # str--> XX int XX 
# # # # # char --> int (ascii)

# # # # # ord(<char>) --> char --> ascii
# # # # # chr(<ascii>) --> ascii --> char 

# # # # # print(ord("a"))
# # # # # print(ord(" "))
# # # # # print(ord("Z"))
# # # # # print(ord("p"))
# # # # # print(ord("1"))

# # # # # print(chr(120))
# # # # # print(chr(95))
# # # # # print(chr(100))
# # # # # print(chr(68))

# # # # # functions
# # # # # 	- parameterised  --> (<something>)
# # # # # 	- attribute fetching --> . 

# # # # # string functions
# # # # # 	- case based functions
# # # # # 	- check functions 
# # # # # 	- manipulative functions

# # # # # case based functions 

# # # # tech = "python and Machine Learning"

# # # # # <strname>.lower()
# # # # print(tech.lower())

# # # # # <strname>.upper()
# # # # print(tech.upper())

# # # # # <strname>.capitalize()
# # # # print(tech.capitalize())

# # # # # <strname>.swapcase()
# # # # print(tech.swapcase())

# # # # # <strname>.title()
# # # # print(tech.title())


# # # # check , manipulative --> 240619

# # # # # conditional statements 
# # # # # ----------------------
# # # # # descision 
# # # # # condition
# # # # # 	True ---> statement1 
# # # # # 	False ---> statement2 

# # # # # condition + statement

# # # # # if  --> 1 statement
# # # # # if else  --> 2 statement2
# # # # # if elif elif elif  else  --> 5 statements

# # # # # syntax 
# # # # # ------

# # # # # if <condition>:
# # # # # 	<statement>

# # # # a = 10
# # # # if a>5 :
# # # # 	print("a gt 5 ")


# # # # a = 1
# # # # if a>5 :
# # # # 	print("a gt 5 ")
# # # # else:
# # # # 	print("a not gt 5")

# # # # a = 10
# # # # if a>5:
# # # # 	print("a gt 5 ") 
# # # # elif a>8:
# # # # 	print("a gt 8 ")
# # # # elif a == 10 :
# # # # 	print("a eq 10")
# # # # else:
# # # # 	print("none")

# # # # if 
# # # # 	if 
# # # # 	else 
# # # # else 

# # # # a = 10 
# # # # if a>3:
# # # # 	print("a gt 3")
# # # # 	if a == 4 :
# # # # 		print("a eq 4")
# # # # 	elif a == 5  :
# # # # 		print("a eq 5")
# # # # 	else :
# # # # 		print("a not eq 4 and 5")
# # # # else:
# # # # 	print("a lt 3 ")

# # # # enter a number 
# # # # 10 
# # # # 10 is even 


# # # # enter a number 
# # # # 13 
# # # # 13 is odd 

# # # # num = int(raw_input("enter a number : "))
# # # # if num%2 == 0 :
# # # # 	print("%d is even "%(num))
# # # # else:
# # # # 	print("%d is odd "%(num))

# # # # int 
# # # # 	even odd 
# # # # str 
# # # # 	XX even odd XX 

# # # # int str ??
# # # # 	int ---> even odd ??

# # # # num = raw_input("enter a number : ")

# # # # if num.isdigit():
# # # # 	num = int(num)
# # # # 	if num%2 == 0 :
# # # # 		print("%d is even "%(num))
# # # # 	else:
# # # # 		print("%d is odd "%(num))
# # # # else:
# # # # 	print("invalid inputs passed ")

# # # # 3 5 

# # # # enter a number 
# # # # 10 
# # # # 10 is multiple of 5 only 
# # # # enter a number 
# # # # 9 
# # # # 9 is multiple of 3 only 
# # # # enter a number 
# # # # 15 
# # # # 15 is multiple of both 
# # # # enter a number 
# # # # 14 
# # # # 14 is  not a multiple of both

# # # # num = raw_input("enter a number : ")  #10
# # # # if num.isdigit():
# # # # 	num = int(num)
# # # # 	if num%3 == 0 and num%5 == 0  :
# # # # 		print("%d is multiple of 3 and 5 "%(num))
# # # # 	elif num%5 == 0 :
# # # # 		print("%d is multiple of 5 only "%(num))
# # # # 	elif num%3 == 0 :
# # # # 		print("%d is multiple of 3 only "%(num))
# # # # 	else:
# # # # 		print("none")
# # # # else:
# # # # 	print("invalid inputs passed ")

# # # # enter an input 
# # # # 10 
# # # # 100
# # # # enter an input 
# # # # python 
# # # # 6 
# # # # enter an input 
# # # # python is easy 
# # # # ["python" ,"is" ,"easy"]

# # # # ip = raw_input("enter an input : ")
# # # # if ip.isdigit():
# # # # 	ip = int(ip)
# # # # 	print(ip**2)
# # # # elif  " " in ip:
# # # # 	print(ip.split())	
# # # # else:
# # # # 	print(len(ip))

# # # # enter a stmt 
# # # # python is an easy programming language
# # # # enter a word 
# # # # python 
# # # # enter an option 
# # # # 	1. replace 
# # # # 	2. index
# # # # 1 
# # # # enter a new word 
# # # # java
# # # # java is an easy programming language


# # # # enter a stmt 
# # # # python is an easy programming language
# # # # enter a word 
# # # # python 
# # # # enter an option 
# # # # 	1. replace 
# # # # 	2. index
# # # # 2
# # # # 0

# # # # enter a stmt 
# # # # python is an easy programming language
# # # # enter a word 
# # # # java 
# # # # word does not exist in stmt 

# # # # enter a float value 
# # # # 12.34 
# # # # int - 12
# # # # decimal - 34
 
# # # # enter a float value 
# # # # 12.34.45 
# # # # not a float 

# # # # enter a float value 
# # # # abc.bcde
# # # # 3 
# # # # 4

# # # # enter a float value 
# # # # 12
# # # # int - 12
# # # # decimal - 00

# # # # ip = raw_input("enter a float value : ")

# # # # if ip.count(".") == 0 :
# # # # 	print("int - " + ip)
# # # # 	print("decimal - 00" )

# # # # elif ip.count(".") == 1 :   # int ?? str ??
# # # # 	ind = ip.index(".")
# # # # 	f = ip[0:ind]
# # # # 	s = ip[ind+1:]
# # # # 	if f.isdigit() and s.isdigit():
# # # # 		print("int - " + ip[0:ind])
# # # # 		print("decimal - " + ip[ind+1:])
# # # # 	else:
# # # # 		print("len 1  - " + str(len(ip[0:ind])))
# # # # 		print("len 2 - " + str(len(ip[ind+1:])))
# # # # else:
# # # # 	print("not a float")

# # # # enter a time in hh:mm:ssFF format 
# # # # 08:24:34pm 
# # # # 20:24:34

# # # # enter a time in hh:mm:ssFF format 
# # # # 08:24:34am 
# # # # 08:24:34

# # # # enter a time in hh:mm:ssFF format 
# # # # 8:24:34am 
# # # # not in format specified 

# # # # time = raw_input("enter a time in hh:mm:ssFF format : ")
# # # # if len(time) == 10:
# # # # 	h = time[:2]
# # # # 	m = time[3:5]
# # # # 	s = time[6:8]
# # # # 	f = time[8:]
# # # # 	if f == "pm":
# # # # 		print("%d:%s:%s"%(int(h)+12,m,s))
# # # # 	else:
# # # # 		print("%s:%s:%s"%(h,m,s))
# # # # else:
# # # # 	print("not in format specified")

# # # # enter a char 
# # # # m
# # # # enter a char 
# # # # p 
# # # # p appears after m 

# # # # enter a char 
# # # # a
# # # # enter a char 
# # # # o
# # # # a appears before o 


# # # # enter a number 
# # # # 5 
# # # # 005 025 125 

# # # # enter a number 
# # # # 3 
# # # # 05 09 27 

# # # # enter a number 
# # # # 10
# # # # 0010 0100 1000

# # # # looping structures 
# # # # ------------------
# # # # repetitions / iterations 

# # # # initialisation 
# # # # limit --> condition
# # # # inc/dec --> step
# # # # statements 

# # # # finite 
# # # # infinite 

# # # # for --> finite
# # # # 	numbers 
# # # # 	strings 
# # # # 	collections  
# # # # while --> finite , infinite
# # # # 	numbers 

# # # # for -> numbers
# # # # 	finite -> start , end 
# # # # 	initialisation --> start 
# # # # 	limit --> end 

# # # # 	range() 
	
# # # # range(<end>)
# # # # range(10) --> 0 1 2 3 4 5 6 7 8 9 --> initialisation=0 , limit=10 , step= +1 

# # # # range(<start>,<end>)
# # # # range(3,8) --> 3 4 5 6 7 --> initialisation = 3 , limit=8 , step = +1 

# # # # range(<start>,<end>,<step>)
# # # # range(3,18,5) --> 3 8 13  --> initialisation = 3 , limit=18 , step = +5 

# # # # range(<start>,<end>,<step>) # end>start
# # # # range(18,10,-1) --> 18 17 16 15 14 13 12 11 --> initialisation = 18, limit=10 , step = -1 

# # # # range(<start>,<end>,<step>) # end>start
# # # # range(18,3,-4) --> 18 14 10 6  --> initialisation = 18, limit=3 , step = -4 

# # # # syntax
# # # # ------

# # # # for <dummy> in <range>:
# # # # 	<statements>

# # # # for i in range(10):
# # # # 	print(i)

# # # # for i in range(3,8):
# # # # 	print(i)

# # # # for i in range(10,100,5):
# # # # 	print(i)

# # # # m = 3 
# # # # n = 10 
# # # # for i in range(n,m,-1):
# # # # 	print(i)

# # # # for i in range(100,50,-10):
# # # # 	print(i)

# # # # patterns 
# # # # 	* 
# # # # 	number 
# # # # 	char 

# # # n = 5
# # # # *
# # # # **
# # # # ***
# # # # ****
# # # # *****

# # # # print("*" * 1)
# # # # print("*" * 2)
# # # # print("*" * 3)
# # # # print("*" * 4)
# # # # print("*" * 5)

# # # # for i in range(1,n+1):
# # # # 	print("*" * i)


# # # n = 5
# # # # 1
# # # # 22
# # # # 333
# # # # 4444
# # # # 55555

# # # # for i in range(1,n+1):
# # # # 	print(str(i)* i)

# # # n = 5 
# # # #     *
# # # #    **
# # # #   ***
# # # #  ****
# # # # *****

# # # # st = 3 
# # # # en = 17 

# # # # for i in range(st,en+1):
# # # # 	if i%2 == 0:
# # # # 		print("%d is even"%(i))
# # # # 	else:
# # # # 		print("%d is odd"%(i))

# # # # n = 7 
# # # # a
# # # # bb 
# # # # ccc 
# # # # dddd
# # # # eeeee

# # # # string = "abcdefghijk"
# # # # for index in range(n):
# # # # 	print(string[index] * (index+1))

# # # # n = 5
# # # # for i in range(ord("a") , ord("a")+n):
# # # # 	print(chr(i) * (i-ord("a")+1))

# # # # a 97 --> 1 --> 97-97 +1
# # # # b 98 --> 2 --> 98-97 +1
# # # # c 99 --> 3 --> 99-97 +1
# # # # 				i-ord("a") + 1


# # # # ****
# # # # ***
# # # # **
# # # # *

# # # #     *
# # # #    **
# # # #   ***
# # # #  ****
# # # # *****

# # # # n = 5 
# # # # ch --> d 

# # # # d
# # # # ee
# # # # fff 
# # # # gggg 
# # # # hhhhh

# # # # n --> 5 
# # # # 000 000 000 
# # # # 001 001 001
# # # # 002 004 008 
# # # # 003 009 027
# # # # 004 016 064
# # # # 005 025 125

# # # # n = 5
# # # # l = len(str(n**3))
# # # # for i in range(n+1):
# # # # 	print("%s %s %s" %(str(i).zfill(l) , str(i**2).zfill(l) , str(i**3).zfill(l)))

# # # # n --> 5 
# # # # 1
# # # # 12
# # # # 123
# # # # 1234
# # # # 12345

# # # # 12345
# # # # n = 5 

# # # # for i in range(1,2):
# # # # 	print(i,end="")
# # # # print()
# # # # for i in range(1,3):
# # # # 	print(i,end="")
# # # # print()
# # # # for i in range(1,4):
# # # # 	print(i,end="")
# # # # print()
# # # # for i in range(1,5):
# # # # 	print(i,end="")
# # # # print()
# # # # for i in range(1,6):
# # # # 	print(i,end="")
# # # # print()

# # # # n= 8
# # # # for j in range(1,n+1):
# # # # 	for i in range(1,j+1):
# # # # 		print(i,end="")
# # # # 	print()

# # # # 11 --> 1 , 11 --> prime
# # # # 12 --> 1, 2,3 ,4 ,6, 12 --> composite 


# # # # num = 13 --> 13 is prime
# # # # num = 12 --> 12 is composite

# # # # n = 130
# # # # for i in range(2,n): # 1 12 
# # # # 	if n%i == 0:
# # # # 		print(str(n) + "is composite")
# # # # 	else:
# # # # 		print(str(n) + "is prime")

# # # # n = 13 
# # # # c = 0 
# # # # for i in range(1,n+1):
# # # # 	if n%i == 0 :
# # # # 		c = c+1
# # # # if c>2 :
# # # # 	print("no of factors " + str(c))
# # # # 	print(str(n) + " is composite")
# # # # else:
# # # # 	print(str(n) + " is prime")

# # # # st --> 10 
# # # # en --> 30

# # # # 10 is composite (4 factors)
# # # # 11 is prime
# # # # 12 is composite (6 factors)
# # # # .
# # # # .
# # # # .
# # # # 30 is composite (__ factors)

# # # # for j in range(10,31):
# # # # 	c = 0 
# # # # 	for i in range(1,j+1):
# # # # 		if j%i == 0 :
# # # # 			c = c+1
# # # # 	if c>2 :
# # # # 		print("no of factors " + str(c))
# # # # 		print(str(j) + " is composite")
# # # # 	else:
# # # # 		print(str(j) + " is prime")

# # # # n = 5 
# # # # 5 X 1 = 5 
# # # # .
# # # # .
# # # # .
# # # # .
# # # # 5 X 10 = 50 

# # # stmt = "python is an easy programming language"
# # # char = "n"

# # # # 5 , 11 , 27 , 32 

# # # # for i in range(len(stmt)):
# # # # 	if stmt[i] == char:
# # # # 		print(i)

# # # # 020719 --> for strings , while 

# # # stmt = 'python is an easy PROGRAMMING language'

# # # # for <dummy> in <strname>:
# # # # 	<statements>

# # # # for i in stmt:
# # # # 	print(i)

# # # # o i a a o a i a a e 

# # # vowels = "aeiou"

# # # # for i in stmt:
# # # # 	if i.lower() in vowels:
# # # # 		print(i)

# # # n = 8
# # # # a 
# # # # ab 
# # # # abc 
# # # # abcd 
# # # # abcde 

# # # # for j in range(1,n+1):
# # # # 	for i in range(ord("a") , ord("a")+j):
# # # # 		print(chr(i),end="")
# # # # 	print()

# # # # abcde --> ord("a") . . .  ord("a")+5
# # # # abcd  --> ord("a") . . . ord("a")+4 
# # # # abc  --> ord("a") . . . ord("a")+3 
# # # # ab  --> ord("a") . . . ord("a")+2
# # # # a  --> ord("a") . . . ord("a")+1

# # # stmt = 'python is an easy programming language'
# # # char = "h"

# # # # p y t o n s n . . .. . u 

# # # # for i in stmt:
# # # # 	if ord(i) > ord(char):
# # # # 		print(i)

# # # # for i in stmt:
# # # # 	if ord(i) < ord(char):
# # # # 		print(i)


# # # stmt = 'python is an easy programming language'
# # # char = " "

# # # # for i in stmt:
# # # # 	# print(stmt.index(char))
# # # # 	print(i +"--> "+ str(stmt.index(i)))

# # # # print(stmt.index(char,0))
# # # # print(stmt.index(char,7))
# # # # print(stmt.index(char,10))
# # # # print(stmt.index(char,13))
# # # # print(stmt.index(char,18))

# # # # ind = -1
# # # # for i in range(stmt.count(char)):
# # # # 	ind = stmt.index(char,ind+1)
# # # # 	print(ind)

# # # # ind = stmt.index(char,ind+1) # 6 
# # # # ind = stmt.index(char,ind+1) # 9
# # # # ind = stmt.index(char,ind+1) # 12
# # # # ind = stmt.index(char,ind+1) # 17
# # # # ind = stmt.index(char,ind+1) # 29

# # # # while loop 
# # # # syntax
# # # # ------

# # # # <initialisation>
# # # # while  <condition>:
# # # # 	<statements>
# # # # 	<inc/dec>

# # # # a = 1
# # # # while a<=10:
# # # # 	print(a)
# # # # 	a = a+1 

# # # # a = 10
# # # # while a>=1:
# # # # 	print(a)
# # # # 	a = a-1 

# # # # condition --> always true
# # # # XX inc / dec XX 
# # # # while <condition>:
# # # # 	<statements>

# # # # while True:
# # # # 	<statements>

# # # # patterns ---> while 

# # # # control statements --> 030719

# # # # - pass 
# # # # - break 
# # # # - continue

# # # # pass 	
# # # # 	- unimplemented blocks 

# # # # a=1
# # # # if a>5:
# # # # 	pass
# # # # else:
# # # # 	print(a)

# # # # for i in range(10):
# # # # 	pass

# # # # break 

# # # # for i in range(10):
# # # # 	if i == 5: # 0 1 2 3 4 5
# # # # 		break
# # # # 	print(i) # 0 1 2 3 4 

# # # # for i in range(10):
# # # # 	print(i) # 0 1 2 3 4 5 
# # # # 	if i == 5: # 0 1 2 3 4 5 XX 
# # # # 		break 

# # # # stmt = "python is an easy programming language"

# # # # for i in stmt:
# # # # 	if i == "a":
# # # # 		break
# # # # 	print(i)

# # # # for i in stmt:
# # # # 	print(i)
# # # # 	if i == "a":
# # # # 		break

# # # # continue

# # # # for i in range(10):
# # # # 	if i == 5: # 0 1 . . 4 5 6 . . 9
# # # # 		continue
# # # # 	print(i) # 0 1 2 3 4 6 7 8 9  

# # # # for i in range(10):
# # # # 	print(i) # 0 1 2 3 . . . . 9 
# # # # 	if i == 5: # 0 1 . . 4 5 6 . . 9
# # # # 		continue
 
# # # # stmt = "python is an easy programming language"

# # # # for i in stmt:
# # # # 	if i == "a":
# # # # 		continue
# # # # 	print(i)


# # # # num1  --> 100 
# # # # num2  --> 4

# # # # 0 1 2 3 5 6 7 9 10 11 13 . . .  99

# # # # n1  --> 100 
# # # # n2  --> 5

# # # # 5 10 15 20 25 30 . . . .  100 

# # # # num1 --> "python"
# # # # invalid input passed 

# # # # num1 = 100 
# # # # num2 = 4 
# # # # for i in range(1,num1+1):
# # # # 	if i%num2 == 0 :
# # # # 		continue
# # # # 	print(i)

# # # # n1 = 100 
# # # # n2 = 5 

# # # # for i in range(1,n1+1):
# # # # 	if i%n2 != 0 :
# # # # 		continue
# # # # 	print(i) 

# # # # module 2 --> collections --> 040719 
# # # # 	lists 
# # # # 	tuples
# # # # 	dictionaries

# # # # special collections
# # # # 	sets 
# # # # 	frozensets

# # # # collections 
# # # # 	- heterogeneous 
# # # # 	- nested 
# # # # 	- class 
# # # # 	- stacks 


# # # # stack 	----------------------------------
# # # # 			|
# # # # 			----------------------------------

# # # # queue		----------------------------------
# # # # 			out 							in
# # # # 			----------------------------------

# # # # lists 
# # # # 	- <class list> 
# # # # 	- heterogeneous
# # # # 	- repetitions
# # # # 	- mutable 
# # # # i s c i 

# # # # syntax 
# # # # ------
# # # # <listname> = [<ele1>,<ele2>,<ele3>,<ele4> . . . .]

# # # # nums = [34,3,54,6,7,8,79,80,1,34,5,53,4,7,689]
# # # # print(nums)
# # # # print(type(nums))

# # # # <listname>[<index>]
# # # # print(nums[0])
# # # # print(nums[7])
# # # # print(nums[-2])

# # # # <listname>[<sindex> : <eindex>]
# # # # print(nums[0:3])
# # # # print(nums[-5:-1])
# # # # print(nums[:3])
# # # # print(nums[6:])
# # # # print(nums[0::2])
# # # # print(nums[7:0:-1])


# # # # nums = [34,3,54,6,7,8,79,80,1,34,5,53,4,7,689]
# # # # print(nums)
# # # # tech = ["python" , "java" , "mysql" ,"php"]
# # # # print(tech)

# # # # newlist = nums + tech
# # # # print(newlist)

# # # # del <listname>[<index>]
# # # # del nums[0]
# # # # print(nums)
# # # # del nums[5]
# # # # print(nums)
# # # # del nums[3:8]
# # # # print(nums)

# # # # <listname>[<index>] = <newvalue>
# # # # nums[0] = 100 
# # # # print(nums)
# # # # nums[-1] = "python" 
# # # # print(nums)
# # # # nums[8] = "java" 
# # # # print(nums)
# # # # nums[3:6] = "hyd",200,"bom" 
# # # # print(nums)
# # # # nums[1:10:2] = "hyd",200,"bom","py","java"
# # # # print(nums)

# # # # print(34 in nums)
# # # # print(10 not in nums)
# # # # print("python" in nums)

# # # # nums = [34,3,"python" , 6,[7,1,"java"] , 8,79,[80,"mysql" ],"php",689]
# # # # print(nums)
# # # # print(nums[0])
# # # # print(nums[4])
# # # # print(type(nums))
# # # # print(nums[4][2])

# # # # v = nums[4]
# # # # print(v)
# # # # print(type(v))
# # # # nums[4][2]

# # # # l = [[[[[[[[10]]]]]]]]
# # # # print(l[0][0][0][0][0][0][0][0])

# # # # for <dummy> in <listname>:
# # # # 	<statements>

# # # # for i in nums:
# # # # 	print(i)

# # # # list functions --> 040719 
# # # nums = [34,3,"python" , 6,[7,1,"java"] ,1,1,1,3, 8,79,[80,"mysql" ],"php",689]

# # # # len(<listname>)
# # # # print(len(nums))

# # # # <listname>.count(<ele>) # repetitions
# # # # print(nums.count(1))
# # # # print(nums.count(10))

# # # # <listname>.index(<ele>) # index value
# # # # print(nums.index(34))
# # # # print(nums.index(689))

# # # # <listname>.append(<ele>)
# # # print(nums)
# # # # a = nums.append(100)
# # # # print(a) # None
# # # # print(nums)
# # # # nums.append("hyd")
# # # # print(nums)

# # # # <listname>.insert(<index> , <ele>)
# # # # nums.insert(0,100)
# # # # print(nums)
# # # # a = nums.insert(5,"hyd")
# # # # print(nums)
# # # # print(a) # None

# # # # <listname>.pop()
# # # # nums.pop()
# # # # print(nums)
# # # # a = nums.pop()
# # # # print(nums)
# # # # print(a) # php 

# # # # <listname>.remove(<ele>)
# # # # nums.remove(1)
# # # # print(nums)
# # # # a = nums.remove(6)
# # # # print(nums)
# # # # print(a) # None

# # # # nums.remove(nums[3])
# # # # print(nums)

# # # n = 10 
# # # # [0,1,2,3,4,. . . . .10]
# # # l = []

# # # for i in range(n+1):
# # # 	l.append(i)
# # # print(l)


# # # for i in range(len(l1)):
# # # 	for j in range(1,len(l1)):
# # # 		if l1[i] == l1[j]:
# # # 			l1.remove(l1[i])
# # # print(l1)

# # # for i in range(len(l1)):
# # # 	if l1.count(l1[i]) >1 :
# # # 		l1.remove(l1[i])
# # # print(l1)


# l1 = [2,32,43,65,5,"hyd",200,"bom","py","java","python" , "java" , "mysql", 1,34,5,53,4]

# # print(32 in l1)
# # print(32 in op)

# # for i in l1:
# # 	if i not in op:
# # 		op.append(i)
# # print(op)

# # # ints = []
# # # strs = []

# # # for i in l1:
# # # 	if str(i).isdigit():
# # # 		ints.append(i)
# # # print(ints)

# # # for i in l1:
# # # 	if type(i) is int:
# # # 		ints.append(i)
# # # 	else:
# # # 		strs.append(i)
# # # print(ints)
# # # print(strs)


# # nums = [34,3,"python" , 6,[7,1,"java"] , 8,79,[80,"mysql" ],"php",689]
# # op = []
# # for i in nums:
# # 	if type(i) is list:
# # 		for j in i:
# # 			op.append(j)
# # 	else:
# # 		op.append(i)
# # print(op)


# # n --> 10 
# # [0,1,2, . . . . 10 ]
# # [0,1,4, . . . . 100 ]
# # [2,4,6,8,10]
# # [4,16,36,64,100]

# # num --> 4 
# # [a , b , c  ,d]

# # char --> g 
# # num --> 4 
# # [g , h , i , j]

# # num --> 4 
# # [a , ab , abc , abcd ]

# # <listname>.sort()
# nums = [34,3,54,6,7,8,79,80,1,34,5,53,4,7,689]
# # nums.sort()
# # print(nums)
# # # <listname>.reverse()
# # nums.reverse()
# # print(nums)
# # nums.sort(reverse = True)
# # print(nums)

# tech = ["python" , "java" , "mysql" ,"php"]
# # tech.sort()
# # print(tech)
# # a = tech.sort()
# # print(a)
# # print(tech)

# # a = tech
# # print(a)


# # insert , append , sort , remove --> None 
# tech = ["python","java","mysql","php","django",".net","oracle","ds"]
# nums = [2,4,7,0]

# # op = ["mysql","django","ds","python"]
# # op = []
# # for i in nums:
# # 	op.append(tech[i])
# # print(op)

# # st --> 10
# # en --> 20 

# # 10 --> [1,2,5,10] --> composite
# # 11 --> [1,11] --> prime 
# # .
# # .
# # .
# # 20 --> [1,2,4,5,10,20] --> composite

# # for --> st en 
# # 	l = []
# # 	check for factors --> for 
# # 		if 
# # 			append

# # n = 10 
# # l = [] # initialisation
# # for i in range(n+1): # iteration
# # 	l.append(i) # assignment 
# # print(l)	

# # n = 10 
# # l = [] # initialisation
# # for i in range(n+1): # iteration
# # 	if i%2 == 0 : # condition
# # 		l.append(i) # assignment 
# # print(l)	

# # n = 10 
# # l = [] # initialisation
# # for i in range(n+1): # iteration
# # 	l.append(i**2) # assignment + operation
# # print(l)	


# # n = 10 
# # l = [] # initialisation
# # for i in range(n+1): # iteration
# # 	if i%2 == 0 : # condition
# # 		l.append(i**2) # assignment + operation
# # print(l)	

# # list comprehensions

# # <listname> = [<assignment>  <iteration>]
# # l = [i for i in range(20)]
# # print(l)

# # <listname> = [<assignment>  <iteration> <condition>]
# # l = [ i for i in range(30)  if i%2 == 0 ]
# # print(l)

# # <listname> = [<assignment + operation>  <iteration>]
# # l = [i**2 for i in range(20)]
# # print(l)

# # <listname> = [<assignment + operation>  <iteration> <condition>]
# # l = [ i**2 for i in range(20)  if i%2 == 0 ]
# # print(l)

# # stmt = "python is an easy programming language"
# # ["python" , "programming" , "language"]
# # words = [i for i in stmt.split() if len(i) > 5]
# # print(words)

# # stmt = "python is an easy programming language"
# # char = "m"
# # chars = [i for i in stmt if ord(i) > ord(char)]
# # chars.sort()
# # print(chars) 

# # word --> for i in stmt.split() 
# # char --> for i in stmt

# # l1 = [10,3,4,50,30]
# # l2 = [23,5,43,54,20,10]
# # op =[]
# # if len(l1) == len(l2):
# # 	for i in range(len(l1)):
# # 		op.append(l1[i]+l2[i])
# # 	print(op)


# # l1 = [10,3,4,50,30]
# # l2 = [23,5,43,54,20,10]

# # op =[] --> sum 
# # extra --> 10 

# # tuples 
# # 	i s c i 
# # 	<class tuple>
# # 	repetitions
# # 	stacks
# # 	immutable
# # 	heterogeneous
# # 	default collections
# # 	1Xn 

# # <tuplename> = (<Ele1> , <ele2> ,<ele3> . . . . )
# nums = (1,2,3,42,4,3,654,67,8)
# # print(nums)
# # print(type(nums))

# # <tuplename>[<index>]
# # print(nums[0])
# # print(nums[3])
# # print(nums[7])

# # print(nums[0:3])
# # print(nums[4:8])

# techs = ("py","java","mysql","php")
# # print(nums + techs)
# # res = nums + techs
# # print(res)

# # for i in techs:
# # 	print(i)

# # print(techs)
# # del techs[2]
# # techs[2] = "oracle"
# # del techs
# # print(techs)

# # a,b = 20 , 30 
# # print(a)
# # print(b)

# # a = 20 , 30
# # print(a)
# # print(type(a))

# # for i in a:
# # 	print(i)

# # constants 
# # less frequently 

# fees = (10,20,40,50,30,25)
# # print(fees)
# # print(type(fees))
# # print(fees[3])
# # tuple --> list ---> modify ---> list --> tuple 
# # 	list() 							tuple()
# # fees = list(fees)
# # print(fees)
# # print(type(fees))
# # fees[3] = 55
# # print(fees)
# # print(type(fees))
# # fees = tuple(fees)
# # print(fees)
# # print(type(fees))


# nums = (34,(3,"python" ), 6,[7,1,"java"] , 8,79,(80,"mysql" ),"php",689)

# # op -->  (34,3,"python",6,7,1,"java",8,79,80,"mysql","php",689)

# # op = []
# # for i in nums:
# # 	if type(i) is list or type(i) is tuple:
# # 		for j in i:
# # 			op.append(j)
# # 	else:
# # 		op.append(i)
# # print(tuple(op))

# # tuple comprehensions --> XX immutable XX 


# l1 = [10,20,30,40]
# l2 = [100,300,4005,600]
# # nl = l1 + l2 
# # print(l1)
# # print(l2)
# # print(nl)

# # <list1>.extend(<list2>)
# # print(l1)
# # print(l2)
# # l1.extend(l2)
# # print(l1)
# # print(l2)

# # infinite loop 
# # for i in l1:
# # 	l1.extend(l2)
# # 	print(l1)

# # for i in range(len(l1)): # range(4)
# # 	l1.extend(l2)
# # 	print(l1)

# # tuples functions 
# # 	len()
# # 	list() 
# # 	index() 
# # 	count() 

# # XXXXXX 
# # 	append
# # 	insert
# # 	pop
# # 	remove
# # 	sort
# # 	extend

# # dictionaries --> 100719 

# # emp ---> name age tech  mob1 mob2 peradd preadd 
# # 			0  1   2    3     4     5      6 

# # emp1 =  [john,  2,   py,    98,   76,    hyd,    hyd] 0123456
# # emp2 =  [jane  ,3   ,java,  9                 ,hyd ]  01234 

# # emp1[0] --> john 
# # emp2[0] --> jane 

# # emp1[3] --> 98 
# # emp2[3] --> 9 

# # emp1[5] --> hyd  
# # emp2[5] --> erorr 

# # emp1[4] --> 76  
# # emp2[4] --> hyd 

# # custom indices --> keys 
# # data keys --> values 
# # keys + values = items

# # keys 
# # 	unique 
# # 	immutable --> int str tuple 
# # values
# # 	anything

# # syntax
# # ------
# # <dictname> = {<k1>:<V1> , <k2>:<v2> , <k3>:<v3>}

# # features
# # 	mutable
# # 	key value pairs 
# # 	arbitary 
# # 	<class dict>
# # 	1Xn 
# # 	heterogeneous

# # d = {}
# # print(d)
# # print(type(d))

# # emp = {"name":"john" , "age":20 , "salary":4 , "address":"hyd"}
# # keys --> name age salary address
# # print(emp)

# nums = {1:"one", 2:"two" , "three":3 , 4:"four" , 5: "five"}
# # keys --> 1 , 2 ,three , 4 ,5 
# # values --> one two 3 four five 
# # print(nums)`

# # techs = {"python":3.7,"mysql":8,"java":8,"php":6,"pip":18}
# # print(techs)

# # techs = {"python":3.7,("mysql","java"):8,"php":6,"pip":18}
# # print(techs)

# # techs = {"python":3.7,"mysql":8,"java":8,"php":6,"pip":18}
# # print(techs)

# # <dictname>[<key>]
# # print(techs["python"])
# # print(techs["pip"])

# # XXX slicing XXX 

# # for i in techs:
# # 	print(i)

# # <dictname>.keys()
# # <dictname>.values()
# # <dictname>.items()

# # for i in techs.keys():
# # 	print(i)
# # for i in techs.values():
# # 	print(i)
# # for i in techs.items():
# # 	print(i)

# # k = list(techs.keys())
# # print(k)
# # v = list(techs.values())
# # print(v)
# # i = list(techs.items())
# # print(i)

# # mutable , functions --> 110719

# techs = {"python":3.7,"mysql":8,"java":8,"php":6,"pip":18}
# # print(techs)

# # del <dictname>[<key>]
# # del techs["java"]
# # print(techs)

# # <dictname>[<key>] = <newvalue>
# # techs["mysql"] = 7 
# # print(techs)
# # techs["php"] = 8 
# # print(techs)

# # techs["oracle"] = 5 
# # print(techs)
# # techs["django"] = 4 
# # print(techs)

# n = 5 
# # {0:0 , 1:1 , 2:4 , 3:9 , 4:16 , 5:25}
# # d = {}
# # for i in range(n+1):
# # 	d[i] = i**2 
# # print(d)

# l1 = [10,20,30,40]
# l2 = [2,3,4,5]
# # {10:2 , 20:3 , 30:4 , 40:5}
# # d = {}

# # if len(l1) == len(l2):
# # 	for i in range(len(l1)):
# # 		d[l1[i]] = l2[i]
# # print(d)

# stmt = "python is an easy language"
# # {"python":6 , "is":2 ,"an":2 , "easy":4 ,"language":8}
# # d = {}
# # for i in stmt.split():
# # 	d[i] = len(i)
# # print(d)

# l1 = [10,20,30,40,50]
# l2 = [2,3,4,5,100,20]

# # zo = zip(l1,l2)
# # print(zo)

# # zl = list(zo)
# # print(zl)

# # zt = tuple(zo)
# # print(zt)

# # zd = dict(zo)
# # print(zd)

# # zo = dict(zip(l1,l2))
# # print(zo)

# # techs = {"python":3.7,"mysql":8,"java":8,"php":6,"pip":18}
# # nums = {1:"one", 2:"two" , "three":3 , 4:"four" , 5: "five"}

# # print(len(techs))
# # print(techs)
# # techs.popitem() # python
# # print(techs)
# # techs.popitem() # pip
# # print(techs)

# # <dictname>.pop(<key>)
# # print(techs)
# # techs.pop("java")
# # print(techs)


# techs = {"python":3.7,"mysql":8,"java":8,"php":6,"pip":18}
# nums = { "php":10,1:"one", 2:"two" , "three":3 , 4:"four" , 5: "five" }

# # <dict1>.update(<dict2>)
# # print(techs)
# # print(nums)
# # techs.update(nums)
# # print(techs)
# # print(nums)

# # techs --> 5
# # nums --> 5 

# # update
# # tech --> 10 
# # nums --> 5	

# # update
# # techs --> 10 
# # nums --> 5 

# # stmt = "python is an easy programming language"
# # char = "m"
# # # {"p":"q","y":"z","t":"u","o":"p" . . .  }
# # d = {}
# # for i in stmt:
# # 	if ord(i) > ord(char):
# # 		d[i] = chr(ord(i)+1)
# # print(d)


# # dictionary comprehensions 

# # <dictname> = {<k>:<v> <iteration>}
# # <dictname> = {<k>:<v> <iteration> <condition>}

# # d = {i : i**2 for i in range(10)}
# # print(d)

# # d=  {i:j for i in range(1,5) for j in range(11,15)}
# # print(d)

# # d = {i:i**2 for i in range(100) if i%5 == 0}
# # print(d)

# # stmt = "python"
# # # d = {"p":"q" , "y":"z" . . . . "n":"o"}
# # d = {i : chr(ord(i)+1) for i in stmt}
# # print(d)

# # sets and frozensets 
# # -------------------
# # py2.4 

# # features
# # 	unique 
# # 	XX i s XX 
# # 	c i 
# # 	arbitary
# # 	heterogeneous
# # 	<class set>
# # 	mutable

# # syntax
# # ------
# # <setname> = {<ele1>,<ele2>,<ele3>,<ele4> . . . }

# # nums = {1,2,2,34,45,4,6,72,32,89,9,329,0,9}
# # print(nums)
# # print(type(nums))

# # emp = {}
# # print(emp)
# # print(type(emp))

# # emp = set(())
# # print(emp)
# # print(type(emp))

# # nums = set((1,2,2,34,45,4,6,72,32,89,9,329,0,9))
# # print(nums)
# # print(type(nums))

# # nums = {1,2,2,34,45,4,6,72,32,89,9,329,0,9}
# # print(nums)

# # for i in nums:
# # 	print(i)

# # print(len(nums))

# # nums.add(100)
# # print(nums)
# # nums.add(300)
# # print(nums)

# # nums.remove(32)
# # print(nums)
# # nums.remove(89)
# # print(nums)
# # nums.remove(100)
# # print(nums)

# # nums.discard(32)
# # print(nums)
# # nums.discard(89)
# # print(nums)
# # nums.discard(100)
# # print(nums)

# s1 = {100,20,30,40,50,80}
# s2 = {40,50,60,70,100}
# s3 = {100,70}
# s4 = {200}

# # <Set1>.union(<set2>)
# # print(s1.union(s2))
# # print(s2.union(s1))

# # <Set1>.intersection(<set2>)
# # print(s1.intersection(s2))

# # <Set1>.difference(<set2>)
# # print(s1.difference(s2))
# # print(s2.difference(s1))

# # <Set1>.issubset(<set2>)
# # <Set1>.issuperset(<set2>)
# # <Set1>.isdisjoint(<set2>)

# # print(s1.issubset(s2))
# # print(s3.issubset(s2))
# # print(s2.issuperset(s3))

# # print(s1.isdisjoint(s4))
# # print(s2.isdisjoint(s4))

# # print(s1|s2) # union
# # print(s1&s2) # intersection
# # print(s1-s2) # difference
# # print(s1>s2) # superset
# # print(s3<s2) # subset

# # frozensets --> add() , remove()
# # 	<class frozenset>
# # 	immutable

# # list --> set 
# # tuple --> frozenset

# # cli inputs 

# # runfile --> ask inputs --> file --> run -> output
# # runfile + inputs --> output 

# # sys module 
# # argv 

# # import sys 
# # print(sys.argv)
# # print((sys.argv[1]) + (sys.argv[2]))
# # cliIn = sys.argv[1:]
# # print(cliIn)

# # c:/>python <filename>.py   10  g 
# # [h , i ,j ,k ,l,m ,n ,o,p,q]

# # c:/>python <filename>.py 10 20 
# # 15 

# # c:/>python <filename>.py 10 20 30 
# # only 2 inputs needed 

# # c:/>python <filename>.py 10 
# # atleast 2 inputs needed 

# # l1 = [ i for i in range(20,25)]
# # print(l1)

# # l1.insert(-3,28)
# # print(l1)
# # l1.insert(3,28)
# # print(l1)

# # functional programming --> 160719 

# # repetitions

# # 100 lines 
# # odd / even --> 10 lines  --> function
# # ------
# # ------
# # ------
# # ------
# # function
# # ------
# # ------
# # ------
# # ------
# # function
# # ------
# # ------
# # ------
# # ------
# # function

# # definition 
# # implementation 
# # call 

# # 2 types 
# # 	pre defined --> print() input() sort() len()
# # 	user defined --> _________

# # 4 kinds 

# # parameters 				returntype 
# # 	0						0        --> sort()	
# # 	1						0 		 --> append() , remove() , insert()
# # 	0						1        --> pop()
# # 	1						1        --> print() , len() , index() 

# # 4 types 
# # 	positional 
# # 	default 
# # 	variable size 
# # 	keyworded 

# # parameters
# # 	formal --> definition , variables 
# # 	actual --> call , values 

# # syntax
# # ------

# # def <functionname>(): ---> definition
# # 	<logic>    ---> implementation

# # <functionname>() --> call 

# def sayHello():
# 	print("Hello")

# # def sayHello():
# # 	print("hi")

# # sayHello()

# # def sayHello():
# # 	print("bye")

# # sayHello()
# # sayHello()
# # sayHello()
# # sayHello()

# # print(sayHello)
# # print(type(sayHello))

# # def addnums(a,b):
# # 	res = a + b 
# # 	print(res)

# # addnums(10,20)

# # def login(name, role):
# # 	print("user name is "+str(name))
# # 	print("user role is "+str(role))
# # 	print

# # login("khan","pd")
# # login("john","d")
# # login("c","jane")

# # avg(10,30,40,50,60) # 190//5 

# # def avg(a,b,c,d,e):
# # 	res = (a+b+c+d+e)//5
# # 	print(res)

# # avg(10,30,40,50,60) 
# # avg(1110,330,410,5230,60) 
# # avg(10,30,40,40) 

# # def login(name, role):
# 	# print("user name is "+str(name))
# 	# print("user role is "+str(role))
# # 	print
# # login("khan","pd")
# # login("john","d")
# # login(role = "c",name = "jane")


# # def subscribe(user , account="free"):
# # 		print("user name is "+(user))
# # 		print("account  is "+(account))

# # subscribe("khan" , "premium")
# # subscribe("john" , "paid")
# # subscribe("jane" , "paid")
# # subscribe("ravi" )
# # subscribe("rahul" )
# # subscribe("abc" )

# # def subscribe( account="free",user):
# # 		print("user name is "+(user))
# # 		print("account  is "+(account))

# # subscribe("premium" , "khan")
# # subscribe("paid" , "jane" )
# # subscribe(user = "ravi" )
# # subscribe(user = "rahul" )
# # subscribe(user = "abc" )


# # def  makecake(flav = "Bs" , shape ="round" , wei = "3" ):
# # 	print("flavour is "+ flav)
# # 	print("shape is "+ shape)
# # 	print("weight is "+ wei)
# # 	print

# # flavour = input("enter a flavour : ")
# # weight = input("enter a weight : ")
# # shape = input("enter a shape : ")

# # makecake(flavour ,shape , weight)
# # makecake("vanilla" , "round" , "3")
# # makecake("choc" ,wei = "4" , shape = "square")
# # makecake(shape = "round" , wei = "2")
# # makecake("pine" , wei = "1")
# # makecake(wei = "5" , flav = "strw" , shape= "oval" )
# # makecake(wei = "1")
# # makecake("bs" )
# # makecake(shape = "rect" )

# # returntype
# # 	values 
# # 	variables
# # 	functionname
# # 	functioncall 


# # def sayHello(name):
# # 	print("hello "+ name)
# # 	return 100  # value

# # print(sayHello("khan"))
# # print(sayHello)

# # def addnums(a,b):
# # 	res = a+b
# # 	# print(res)
# # 	return res # variable

# # addnums(100,200)
# # print(addnums(10,20))
# # addnums(10,20)

# # def avg(a,b,c,d,e): # 5 parameters
# # 	res = (a+b+c+d+e)//5
# # 	print(res)

# # avg(10,30,40,50,60) # 5 parameters


# # variable length parameters
# # --------------------------
# # args 
# # *args 

# # def avg(a,b,*args):
# # 	res = (a+b+sum(args)) // (len(args)+2)
# # 	print(res)

# # avg(10,200)
# # avg(10,20,30,40)
# # avg() # error 
# # avg(10) # error

# # keyworded parameters
# # --------------------
# # kwargs
# # **kwargs 



# # def  makecake(flav = "Bs" , shape ="round" , wei = "3" ,**kwargs ):
# # 	print("flavour is "+ flav)
# # 	print("shape is "+ shape)
# # 	print("weight is "+ wei)
# # 	print(kwargs)
# # 	print

# # makecake("vanilla" , "round" , "3" , toppings = "almonds" , icing = "sugar" )
# # makecake("choc" ,wei = "4" , shape = "square")

# # almonds --> toppings  , sugar --> icing 

# # positional --> variable (*args)
# # default --> keyworded (**kwargs)

# # num1 --> 40 
# # num2 --> 10 

# # addnums(a,b) 40 , 10  --> 50 
# # subnums(___) 50 , 10  --> 40
# # mulnums(___) 40 , 10  --> 400
# # divnums(___) 400 , 10  --> 40

# # register("khan","admin12")
# # register("john","login123")
# # register("jane","lync321")
# # register("harry","123*")
# # register("khan","987123*")
# # print(d)

# # user added
# # user added
# # user added
# # user added
# # user already exists 
# # {"khan":"admin123"  . . . . }

# # return functionname

# # def first():
# # 	print("hello")

# # def second():
# # 	print("bye")
# # 	return first # functionname

# # print(first) # address
# # print(type(first)) # class function

# # first() # hello 
# # print(first()) # hello + None
# # print(type(first())) # hello + class NoneType 


# # print(second) # address
# # print(type(second)) # class function

# # second() # bye 
# # print(second()) # bye + address first
# # print(type(second())) # bye + class function

# # def first():
# # 	print("hello")

# # def second():
# # 	print("bye")
# # 	return first() # functioncall

# # print(first) # address
# # print(type(first)) 

# # first() # hello 
# # print(first()) # hello + none

# # print(second) # address
# # print(type(second)) # class function

# # second() # bye + hello
# # print(second()) # bye + hello + none 
# # print(type(second())) # # bye + hello + NoneType

# # def first():
# # 	print("hello")
# # 	return 100 

# # def second():
# # 	print("bye")
# # 	return first() # functioncall

# # print(first()) # hello + 100 
# # print(type(first())) # hello + int

# # print(second()) # bye + hello + 100
# # print(type(second())) # bye + hello + int
# # print(type(second)) # 

# # lambda functions

# # syntax
# # ------
# # <functionname> = lambda <parameters> : <implementation>

# # addnums = lambda a,b : a+b 
# # print(addnums(10,30))

# # getemail = lambda name , cname="dl" : name + "@" + cname + ".com"
# # print(getemail("khan","lync")) # khan@lync.com
# # print(getemail("john")) # john@dl.com

# # map() filter() reduce() 
# # map() 

# # [1,3,5] --> [1,9,25]
# # [1,2,3] [10,20,30] --> [11,22,33]

# # syntax
# # ------
# # <mapobject> = map(<function/fname> , <collection(s)>)

# l1 = [i for i in range(10,20)]
# l2 = [i for i in range(0,10)]


# # def sq(n):
# # 	return n**2

# # mo = map(sq , l1)
# # print(mo)
# # print(list(mo))

# # def addnums(a,b):
# # 	return a+b 

# # mo = map(addnums , l1 , l2)
# # print(list(mo))

# # l1 = [i for i in range(10,20)]

# # mo = map(lambda a :a**2 , l1)
# # print(list(mo))

# # print(list(map(lambda a:a**2 , [i for i in range(10)])))


# # l1 = [i for i in range(10,20)]
# # l2 = [i for i in range(0,10)]

# # print(list(map(lambda a,b:a+b , l1 ,l2)))

# stmt = "python is an easy programming language"
# # print(list(map(lambda a:ord(a) ,[i for i in stmt])))
# # print(list(map(lambda a:len(a) ,[i for i in stmt.split()])))

# # filter()
# # l1 = [i for i in range(30)]
# # print(l1)

# # syntax
# # ------
# # <fo> = filter(<function/fname> , <collection>)

# # fo = filter(lambda a:a%2==0 , l1)
# # print(list(fo))


# # stmt = "python is an easy programming language"
# # print(list(filter(lambda a:len(a)>4 , [i for i in stmt.split()])))

# # reduce() 
# # functools

# # l1 = [i for i in range(1,10)]

# # op = reduce(lambda a,b:a+b , l1)
# # print(op)

# # op = reduce(lambda a,b:a*b , l1)
# # print(op)

# # files / modules&packages --> 240719

# # files
# # 	file --> ??
# # 	storage of data 

# # 	list --> emp info 
# # 	txt --> emp info 

# # run code --> [] --> data{10}
# # run code --> [] --> data{10}

# # file 
# # 	filename
# # 	location
# # 	extension 

# # txt , html -> default

# # pdf      pypdf2 
# # excel 	 xlsxwriter , pandas 
# # csv      csv , pandas
# # image 	 PIL 

# # mode 
# # "r" --> read only 
# # "w" --> write only 
# # "a" --> append
# # "rb" -> read in binary 
# # "wb" -> write in binary 
# # + -> update 

# # py code --> file obj --> file 

# # create 
# # open 
# # operate 
# # close 

# # open 
# # operate
# # close 

# # open()
# # 	create+open
# # 	open 

# # syntax
# # ------
# # <fileobj> = open(<file> , <mode>)

# # fw = open(r"/Users/digitallync/Desktop/demo.txt" , "a")

# # # write on files 
# # # <fileobj>.write("<something>")
# # # <fileobj>.writelines(<collection>)

# # fw.write("hello\n")
# # fw.write("Hai\n")

# # l1 = [str(i)+"\n" for i in range(10)]
# # fw.writelines(l1)

# # fw.close()


# # writeNums()
# # enter a number 
# # 10 
# # 0 
# # 1
# # .
# # .
# # 10

# # writeChars()
# # enter a number 
# # 5
# # enter a char 
# # b 

# # b 
# # c 
# # d 
# # e
# # f


# # writeChars()
# # enter a number 
# # 3
# # enter a char 
# # a 
# # a 
# # b 
# # c

# # with open(r"/Users/digitallync/Desktop/demo.txt" , "w") as fw:
# # 	fw.write("hello\n")
# # 	fw.write("Hai\n")
# # 	l1 = [str(i) for i in range(10)]
# # 	fw.writelines(l1)

# # reading --> 260719 


# # <fileobj>.read() 

# # fr = open(r"/Users/digitallync/Desktop/demo.txt" , "r")
# # data = fr.read() # entire data 
# # print(data)
# # fr.close()

# # fr = open(r"/Users/digitallync/Desktop/demo.txt" , "r")
# # print(fr.read(10)) # 0 10 
# # print(fr.read(5)) # 11 16 
# # print(fr.read()) # 17 --> end
# # fr.close()

# # <fileobj>.readline() 

# # fr = open(r"/Users/digitallync/Desktop/demo.txt" , "r")
# # print(fr.readline())
# # print(fr.readline())
# # print(fr.readline(5))
# # print(fr.readline())
# # print(fr.read())
# # fr.close()

# # <fileobj>.readlines() 
# # fr = open(r"/Users/digitallync/Desktop/demo.txt" , "r")
# # print(fr.readlines(11))
# # fr.close()

# # ['Ihello\n', 'Hai\n', '0123456789hello\n', 'Hai\n', '0\n', '1\n', '2\n', '3\n', '4\n', '5\n', '6\n', '7\n', '8\n', '9\n']

# # 1 --> len("Ihello")
# # 7 --> len("Ihello") + len("Hai") 7 8 9 10 

# # <fileobj>.tell()
# # fr = open(r"/Users/digitallync/Desktop/demo.txt" , "r")
# # fr.read(11) # 11
# # print(fr.tell())
# # fr.readline() # 16
# # print(fr.tell()) # 27
# # fr.read()
# # print(fr.tell())
# # fr.close()

# # <fileobj>.seek() --> ??
# # whence --> 27 , 15 , -23 
# # offset --> 0  , 1  , 2 

# # password.txt 
# # khan		- 			admin123
# # john		-			lync
# # jane 		-			pass123
# # harry 		-			dl123

# # 1. new user 
# # 2. existing user 
# # enter an option 1 
# # enter your name khan
# # enter your pwd admin123
# # user saved successfully 

# # 1. new user 
# # 2. existing user 
# # enter an option 1 
# # enter your name khan
# # user already exists

# # 1. new user 
# # 2. existing user 
# # enter an option 2 
# # enter your name harry
# # dl123 is your password

# # modules and packages

# # module --> python file 

# # a = 10 
# # print(a)
# # len("word")

# # from functools import reduce
# # import keyword
# # import sys 

# # PyPI 
# # pip list --> 17 -> all external
# # pip freeze --> 15 -> all user 

# # pip freeze 
# # numpy

# # pip list 
# # pip
# # setuptools 
# # numpy

# # pip install <package/module>
# # pip uninstall <package/module>

# # pip --> ?? 
# # install pip --> install 
# # numpy 
# # pandas
# # seaborn 

# # importing modules 

# # import <modulename>
# # import demo
# # print(demo.a)
# # print(demo.b)
# # print(demo.addnums(100,200))

# # from <modulename> import <components>
# # from demo import a , addnums
# # print(a)
# # print(addnums(100,200))

# # from <modulename> import * 
# # from demo import * 
# # print(a)
# # print(b)
# # print(addnums(20,30))

# # package

# # folder  
# # 	1.py
# # 	2.py 
# # 	3.py 
# # 	4.py 

# # package
# # 	__init__.py 
# # 	1.py
# # 	2.py 
# # 	3.py 
# # 	4.py 

# # folder --> + __init__.py --> package

# # package <--- import 

# # random , os 
# # pseudo 

# import random 

# # print(random.random())
# # print(random.randint(10,20))
# # print(random.randrange(5,15))

# # l1 = [i for i in range(10)]
# # print(l1)

# # random.shuffle(l1)
# # print(l1)
# # a = random.choice(l1)
# # print(a)
# # a = random.sample(l1,3)
# # print(a)

# # enter a user name 
# # khan 
# # JeuB4726lHew9234

# # enter a user name 
# # john
# # jhUW3329Khrn3478

# # enter a user name 
# # khan
# # user already exists

# # genPwd(username)
# # 	checkuser() --> 0  1 
# # 	0 --> XX
# # 	1 --> gennums() + genchars() + gennums() + genchars() 

# # os module 
# import os 
# # print(os.name) # posix
# # print(os.getcwd())
# # os.chdir(r"/Users/digitallync/Downloads")
# # print(os.getcwd())
# # items = os.listdir(r"/Users/digitallync/Downloads")
# # print(items)

# # os.mkdir("<dirname>")
# # os.makedirs("<dir1>/<dir2>/<dir3>")

# # os.mkdir("demo")
# # os.makedirs(r"d1/d2/d3")

# # os.rmdir("<dirname>")
# # os.removedirs("<dir1>/<dir2>/<dir3>")

# # os.rmdir("demo")
# # os.removedirs(r"d1/d2/d3")

# # print(os.path.split(r"/Users/digitallync/Desktop/pys"))
# # print(os.path.split(r"/Users/digitallync/Desktop/pys/demo.py"))

# # print(os.path.splitext(r"/Users/digitallync/Desktop/pys"))
# # print(os.path.splitext(r"/Users/digitallync/Desktop/pys/demo.py"))

# # print(os.path.isdir(r"/Users/digitallync/Desktop/pys"))
# # print(os.path.isdir(r"/Users/digitallync/pys"))
# # print(os.path.isfile(r"/Users/digitallync/Desktop/pys"))

# # print(os.path.isdir(r"/Users/digitallync/Desktop/pys/demo.py"))
# # print(os.path.isfile(r"/Users/digitallync/pys/demo.py"))
# # print(os.path.isfile(r"/Users/digitallync/Desktop/pys/demo.py"))

# # os.walk(<path>)
# # 	paths 
# # 	dirs 
# # 	files 

# # for paths,dirs,files in os.walk(r"/Users/digitallync/Desktop"):
# # 	print(paths)
# # 	print(dirs)
# # 	print(files)

# # for i in os.walk(r"/Users/digitallync/Downloads"):
# # 	print(i)
# # 	print("-------")

# # user --> "/Users/digitallync/Desktop"

# # txts 
# # 	2.txt 
# # excels 
# # songs 

# # mp3s 3.mp3 
# # pys 1.py 4.py 
# # pdfs 6.pdf 
# # 	7.pdf 
# # 	8.pdf 	
	
# # classes and objects 

# # class --> collection variables and functions
# # object --> instance of class 

# # syntax
# # ------

# # class <cname>:
# # 	<classvariables>
# # 	<methods>

# # c1 = <cname>()
# # c2 = <cname>()
# # c3 = <cname>()

# # class reference (cn.)
# # object reference (c1.)

# # class company:
# # 	cname = "lync"
# # 	address = "hyd"
# # 	emp_count = 10 

# # 	def addnums(self,a,b):
# # 		print(self)
# # 		res = a+b 
# # 		print(res)

# # c1 = company()
# # c2 = company()
# # c3 = company()

# # c1.addnums(20,30)
# # print(c1)

# # print(company.cname) # lync
# # print(c1.cname)
# # print(c2.cname)
# # print(c3.cname)

# # c1.cname = "DL"

# # print(company.cname)
# # print(c1.cname) # DL 
# # print(c2.cname)
# # print(c3.cname)

# # company.cname = "DLYNC"

# # print(company.cname) # DLYNC
# # print(c1.cname)
# # print(c2.cname)
# # print(c3.cname)


# # class company:
# # 	cname = "lync"
# # 	address = "hyd"
# # 	emp_count = 10 

# # 	def hire(self, emp_name , emp_sal , emp_role):
# # 		print(emp_name)
# # 		print(emp_sal)
# # 		print(emp_role)
# # 		company.emp_count = company.emp_count + 1

# # emp1 = company()
# # emp2 = company()
# # emp3 = company()

# # emp1.hire("khan" , 1 , "pd")
# # emp2.hire("john" , 3 , "d")

# # print(company.emp_count)
# # print(emp1.emp_count)
# # print(emp3.emp_count)

# # constructor
# # 	method 
# # 	__init__(self)

# # object create --> __init__ --> object of class 

# class company:
# 	cname = "lync"
# 	address = "hyd" # "bom"
# 	emp_count = 10 

# 	def __init__(self, emp_name , emp_sal , emp_role):
# 		self.emp_name = emp_name
# 		self.emp_role = emp_role
# 		self.emp_sal = emp_sal 
# 		company.emp_count += 1

# 	def printer(self):
# 		print(self.emp_name)
# 		print(self.emp_sal)
# 		print(self.emp_role)

# 	def hike(self,perc):
# 		self.emp_sal = self.calc(self.emp_sal,perc)
# 		print("salary has been incremented to "+ str(self.emp_sal))

# 	@classmethod
# 	def changeCname(cls,newCname):
# 		cls.cname = newCname
# 		print("company name has changed to "+cls.cname)

# 	@staticmethod
# 	def calc(num,perc):
# 		res = num + (num*perc)
# 		return res

# emp1 = company("khan" , 100 , "pd")
# emp2 = company("john" , 300 , "d")
# emp3 = company("jane" , 500 , "c")

# # emp1.calc(200,0.3)
# # print(emp2.cname) # lync
# # company.changeCname("DL")
# # print(emp2.cname) # DL
# # emp3.changeCname("digitallync")
# # print(emp2.cname)

# # emp1.printer() # 100
# # emp1.hike(0.2)
# # emp1.printer() # 120

# # destructor --> delete an object 
# # __del__(self) --> ???

# # types of methods 
# # 	instance method
# # 	class method  
# # 		cls
# 		# decorator --> @classmethod  
# # 	static method
# 		# calc() 12% 3463527
# 		# weekday(date) --> day 
# 		# @staticmethod


# class --> car 
# 	__init__()
# 	start()
# 	acc()
# 	brake()
# 	stop()
# 	printer()

# c1 = car("city" , 2019)
# c1.start(30)
# c1.printer() # city 2019 30 
# c1.acc(40)
# c1.acc(20)
# c2 = 
# c1.brake(60)
# c1.acc(50)
# c1.printer() # city 2019 80 
# c1.stop()
# c3 = 
# c1.printer() # city 2019 0 

# OOPy --> 090819
# 	inheritance 
# 	polymorphism 
# 	abstraction 
# 	encapsulation 

# inheritance
# 	simple / single 
# 	multiple 
# 	multi level 
# 	hybrid 

# simple
# 		parent --> 5 
# 		child ---> 4 
# 	child <-- parent
# 		p1 --> 5 
# 		c1 --> 9 

# 	vehicle --> 5
# 	bike --> 0 
# 	car --> rev()
# 	bike <---- vehicle
# 	car  <---- vehicle 
# 	v1 --> 5 
# 	b1 --> 5 
# 	c1 --> 6 

# multiple
# 		parent1 --> 5 
# 		parent2 --> 6 
# 		child --> 4 
# 	child <-- parent1 , parent2
# 		p1 --> 5 
# 		p2 --> 6 
# 		c1 --> 15

# 	techEmp --> 4 
# 	mangEmp --> 5
# 	developer <-- techEmp
# 	HR <-- mangEmp
# 	techmanager <-- techEmp , mangEmp

# 	dev --> 4 
# 	HR --> 5 
# 	tm --> 9  

# multi level / hierarchial 
# 	parent1 ---> parent2 ---> parent3 --> parent4 --> child 
# 	developer --> techLead --> manager --> CEO 

# hybrid --> ???

# company <-- object 2.7
# company  3.7

# syntax
# ------
# class parent:
# 	---
# 	---
# 	---

# class child(parent):
# 	---
# 	---

# inheritance , polymorphism --> next class 

# class vehicle:
# 	curr_speed = 0 
# 	def __init__(self,name,model):
# 		self.name = name
# 		self.model = model
# 	def start(self,sspeed):
# 		self.curr_speed = sspeed
# 	def acc(self,aspeed):
# 		self.curr_speed = self.curr_speed + aspeed
# 	def brake(self,bspeed):
# 		self.curr_speed = self.curr_speed - bspeed
# 	def stop(self):
# 		self.curr_speed = 0
# 	def printer(self):
# 		print("Name of car is "+self.name)
# 		print("Model of car is "+str(self.model))
# 		print("speed of car is "+str(self.curr_speed))
# 		print
# class car(vehicle):
# 	def __init__(self,name,model):
# 		print("hello")
# 		super().__init__(name,model)
# 	def rev(self):
# 		print("car is reversed")
# c1 = car("verna" , 2019)
# c1.start(30)
# c1.printer()

# c1 = car("verna" , 2019)
# c1.start(50)
# c1.acc(30)
# c1.printer()

# mro --> ??
# ::

# polymorphism
# ------------
# method overloading 
# 	avg(*args)
# 	cake(**kwargs)

# method overriding

# class vehicle:
# 	curr_speed = 0 
# 	def __init__(self,name,model):
# 		self.name = name
# 		self.model = model
# 	def start(self,sspeed):
# 		self.curr_speed = sspeed
# 	def acc(self,aspeed):
# 		self.curr_speed = self.curr_speed + aspeed
	# def printer(self):
	# 	print("Name of car is "+self.name)
	# 	print("Model of car is "+str(self.model))
	# 	print("speed of car is "+str(self.curr_speed))
		# print

	# def __repr__(self):
	# 	dia = "Name of car is "+self.name
	# 	return dia
	# def __str__(self):
	# 	dia = "Name of car is "+self.name + " Model of car is "+str(self.model) + " speed of car is "+str(self.curr_speed)
	# 	return dia

# c1 = vehicle("verna" , 2019)
# print(c1) # __str__ --> c1 ---> print location
# print(c1) # __str__ --> details ---> print 
# print(c1)

# str --> str 
# repr --> repr 
# str , repr --> str 

# a = int(10) 
# b = int(20) 
# print(a+b) # 30 __add__(10,20)

# a = num(10) 
# b = num(20) 
# print(a+b) # -10 

# class num:
# 	def __init__(self,n):
# 		self.n = n
# 	def __add__(first,second):
# 		res = first.n - second.n
# 		return res 
		
# a = num(10) 
# b = num(20) 
# print(a+b) # -10 
		
# a = int(10) 
# b = int(20) 
# print(a+b) # 20 

# abstraction , encapsulation 

# atmcard - 10k - restaurant -> 1k -> 1k 
# atmcard - 10k - atm machine -> 1k -> 10k 1k 9k 

# user1 --> usernameall , user1 pwd 
# user2 --> usernameall , user1 pwd XXX , user 2 pwd  

# class variables:
# 	a = 10 # public 
# 	# print(a) 
# 	_b = 20 # protected 
# 	# print(_b)
# 	__c = 30 # private 
# 	print(__c)
	
# v1 = variables()
# print(v1.a)
# print(v1._b) # not recommended
# print(v1.__c) # no access XX X
# print(variables.__c)

# <objectname>._<classname>__<variablename>
# print(v1._variables__c)

# functions / methods --> public , private , protected , magic 

# encapsulation
# 	properties --> methods --> acc() brake() stop()
# 	data --> variables --> 30 , 40 ,50 

# vehicle --> class --> start , stop , acc , brake 
# v1 --> object --> 30 40 50 0 

# exception handling --> 210819 
# exception
# 	error

# try 
# try except
# try except except except . . . . 
# try except finally 

# Exception
# 	TypeError 
# 	NameError 
# 	ValueError
# 	FileNotFoundError

# try :
# 	<code>
# except <classname>:
# 	<statements>

# try:
# 	def addnums(a,b):
# 		res = a+b 
# 		print(res)
# 	num1 = int(input("enter a number : "))
# 	num2 = int(input("enter a number : "))
# 	addnums(num1 , num2)
# except ValueError:
# 	print("enter only numbers ")
# 	num1 = int(input("enter a number : "))
# 	num2 = int(input("enter a number : "))
# 	addnums(num1 , num2)

# try:
# 	def employee(name,sal):
# 		print("name of employee is " + name)
# 		print("salary of employee is " + sal)
# 	name = input("enter a name ")
# 	salary = int(input("enter a salary "))
# 	employee(name , salary)
# except TypeError:
# 	print("data type mismatch")

# try:
# 	def divnums(a,b):
# 		res = a//b 
# 		print(res)
# 	num1 = int(input("enter a number : "))
# 	num2 = int(input("enter a number : "))
# 	divnums(num1 , num2)
# except ValueError:
# 	print("enter only numbers ")
# except ZeroDivisionError:
# 	print("enter non zero numbers")

# try:
# 	def divnums(a,b):
# 		res = a//b 
# 		print(res)
# 	num1 = int(input("enter a number : "))
# 	num2 = int(input("enter a number : "))
# 	divnums(num1 , num2)
# except (ValueError , ZeroDivisionError):
# 	print("error has occured")

# try:
# 	def divnums(a,b):
# 		res = a//b 
# 		print(res)
# 	num1 = int(input("enter a number : "))
# 	num2 = int(input("enter a number : "))
# 	divnums(num1 , num2)
# except Exception as e:
# 	print(e)
# finally:
# 	print("bye")

# 100 lines 
# try:
# 	---
# 	---
# 	open file 30 
# 	---
# 	---
# 	---
# 	60 error 
# 	---
# 	---
# 	---
# 	80 close file 
# 	---
# 	---
# except:
# 	60 erorr
# finally:
# 	<statements>

# raise <errorclassname>

# git 

# code 
# 	dev 1 code c
# 	dev 2 code c
# 	dev 3 code c

# repositories --> directories

# install --> git
# 	git libs 
# 	git shell / bash 
# 	git gui

desktop folder --> desktop -->  gitdemo  --> 5 files 
gitdemo --> initialisation
cd desktop/gitdemo
c:/desktop/gitdemo:>git init


gitdemo --> 3 layers 

local repo --> 5 
		|
		|
staging area -->
		|
		|
working directory --> 5 

c:/desktop/gitdemo:>git status
red 
c:/desktop/gitdemo:>git add <filename>
c:/desktop/gitdemo:>git add .
wd == sa 
c:/desktop/gitdemo:>git commit -m "dialouge"
wd == lr 

remote repo
	dev1 l1 
	dev2 l2 
	dev3 l3 

remote repo --> own , github , bitbucket 

account 
create RR 
https://github.com/junaid238/demoGit.git

c:/desktop/gitdemo:>git remote add origin https://github.com/junaid238/demoGit.git

lr --> rr
c:/desktop/gitdemo:>git push origin master
wd == lr == rr 


dev1 --> l1 b1--> rr 
dev11 --> l1 b2--> rr 
dev111 --> l1 b3--> rr 

branches 
master

c:/desktop/gitdemo:>git checkout -b <branchname>
c:/desktop/gitdemo:>git checkout -b khan

c:/desktop/gitdemo:>git checkout -d <branchname>
c:/desktop/gitdemo:>git checkout -d khan

c:/desktop/gitdemo:>git branch

c:/desktop/gitdemo:>git push origin khan

git clone https://github.com/junaid238/gitdemoremote.git

databases 
---------
store data 
operate on data 
manipulate --> CRUD 

data --> structured , semi - structured
databases --> structured , unstructured

programming language --> commands 
database --> queries 

structured databases --> structured query language --> SQL 
unstructured databases --> no structured query language --> NoSQL

SQL --> mysql , oracle , db2 , sqlite , postgres 
NoSQL --> mongodb , cassandra 

mysql --> database SQL 
	opensource
	7.0.4
	5.6 

	install --> 326mb MSI 
		libs 
		shell 
		mysqlworkbench 

mysql --> host --> localhost , port --> 3306 , user --> khan 
			password --> admin123 

	
c:/>mysql -u khan -p 
Enter password admin123

mysql>show databases;
sys 
mysql 
performance-schema

mysql>create database school;

mysql>show databases;
sys 
mysql 
performance-schema
school

mysql>drop database school;

mysql>show databases;
sys 
mysql 
performance-schema

mysql>create database school;

mysql>show databases;
sys 
mysql 
performance-schema
school


architecture 
------------
mysql 
	school 
		students
			sid rno stuName stuAdd stuAge
		classes
			cid classname classtrength
		sections 
			secid secid secname secincharge seccount


mysql>USE school;

mysql>show tables;
empty set 

mysql>create table students(rno int(32) not null unique,stuName varchar(50) not null,stuAdd text not null,stuAge int(32) not null,stumob varchar(14));

mysql>show tables;
students

mysql>drop table students;

mysql>show tables;
empty set 

students --> tablename 
	rno stuName stuAdd stuAge stumob --> colnames , col dtys 

tinyint 
smallint
int 
bigint
float 
long 
double 

char 
varchar 
text 

rno stuName stuAdd stuAge stumob

insert query
insert into students values (1,khan,hyd,30,987);
insert into students(rno,stuName,stuAge,stumob) values (2,john,30,987);

select query
select * from students; # 9
select rno from students; # 2
select rno,stuName from students; # 4 
select * from students where rno = 2;
select * from students sort_by(age);

python ---> connector --> mysql 
connector --> PyMySQL --> external module

pip install PyMySQL 

PyMySQL
mysql-connect
MySQLdb 

python , mysql , PyMySQL

connection.py
try:
	import PyMySQL
	conn = PyMySQL.connect(host = "localhost","khan","admin","school")
	if conn:
		print("succesfull")
		#cursor object
		cur = conn.cursor()

		createQuery = '''create table if not exists students(rno int(32) not null unique,stuName varchar(50) not null,stuAdd text not null,stuAge int(32) not null,stumob varchar(14));'''
		cur.execute(createQuery)
		insertQuery ="insert into students values(1,khan,hyd,30,987);"
		cur.execute(insertQuery)
		conn.commit()
	else:
		print("connection not made.")

finally:
	conn.close()
	print("connection closed.")

fetch_one()
fetch_all()
fetch_many() --> ???

enter a username
khan 
enter a password
98765

users 
	username password
		khan	98765

secure database connection 

config.ini(creds)---> parsing ---> connection.py
parsing --> myparser.py 

config.ini --> myparser.py --> connection.py

config.ini 
	-> section 
	-> data 



connection.py

import PyMySQL
from myParser import mycreds
try:
	creds = mycreds()
	conn = PyMySQL.connect(**creds)
	if conn:
		print("succesfull")
		conn.commit()
	else:
		print("connection not made.")

finally:
	conn.close()
	print("connection closed.")