# # # # # # # # # # # # # # khan 
# # # # # # # # # # # # # # 	35 hrs + 10 hrs 

# # # # # # # # # # # # # # 	- basics of programming
# # # # # # # # # # # # # # 	- collections 
# # # # # # # # # # # # # # 	- functional programming
# # # # # # # # # # # # # # 	- OOpy + database 

# # # # # # # # # # # # # # 	3 hrs - django overview 
# # # # # # # # # # # # # # 	2 hrs - git 

# # # # # # # # # # # # # # 	3 hrs - 1 poc mini project guidance 
# # # # # # # # # # # # # # 	2 hrs - assessment 

# # # # # # # # # # # # # # 1hr / day 
# # # # # # # # # # # # # # 5 days / week 

# # # # # # # # # # # # # # 45 hrs / 60 days 

# # # # # # # # # # # # # python ---> ???
# # # # # # # # # # # # # 	programming language 
# # # # # # # # # # # # # 	scripting language

# # # # # # # # # # # # # programming
# # # # # # # # # # # # # 2000 								2019
# # # # # # # # # # # # # fb.com  -----> code(program) ----> fb.com 
# # # # # # # # # # # # # 0 									100

# # # # # # # # # # # # # scripting --> automation 
# # # # # # # # # # # # # windows ----> code ---> new folder (windows)
# # # # # # # # # # # # # 100                     100 + __ 

# # # # # # # # # # # # # python 	--> 1991 --> van rossum 
# # # # # # # # # # # # # python --> python.org 

# # # # # # # # # # # # # use cases 
# # # # # # # # # # # # # ---------
# # # # # # # # # # # # # web development 
# # # # # # # # # # # # # Gui development
# # # # # # # # # # # # # scripting (automation) --> devops + cloud 
# # # # # # # # # # # # # scientific computing  --> ML / dl / ds / ai 

# # # # # # # # # # # # # testing automation
# # # # # # # # # # # # # 3d designing 
# # # # # # # # # # # # # game development
# # # # # # # # # # # # # mobile apps 


# # # # # # # # # # # # # web development --> web apps --> data is remote
# # # # # # # # # # # # # 	- network 
# # # # # # # # # # # # # 	- browser 

# # # # # # # # # # # # # java , .net , php . . . .

# # # # # # # # # # # # # youtube , instagram , dropbox , flickr , google , torrents 
# # # # # # # # # # # # # 	lots of data 

# # # # # # # # # # # # # py vs java

# # # # # # # # # # # # # py --> youtube.com 
# # # # # # # # # # # # # lots of data 
# # # # # # # # # # # # # 10 billions 
# # # # # # # # # # # # # less time 

# # # # # # # # # # # # # java --> bank.online.com 
# # # # # # # # # # # # # 1 billion
# # # # # # # # # # # # # less data 
# # # # # # # # # # # # # lots of time 


# # # # # # # # # # # # # speed vs security 
# # # # # # # # # # # # # py --> speed , lots data 
# # # # # # # # # # # # # java --> security , less data 

# # # # # # # # # # # # # XXXX py ---> web app XXXX
# # # # # # # # # # # # # web frame work  --> django , flask , rails 
# # # # # # # # # # # # # py + wfw ---> web apps 

# # # # # # # # # # # # # gui development
# # # # # # # # # # # # # 	- desktop apps --> data is local 
# # # # # # # # # # # # # 	- XX network XX 
# # # # # # # # # # # # # 	- XX browser XX 

# # # # # # # # # # # # # 	- billing systems

# # # # # # # # # # # # # java , js 

# # # # # # # # # # # # # XXX py --> gui app XXX 	
# # # # # # # # # # # # # gui frame work --> pyqt4 , tkinter 
# # # # # # # # # # # # # py + Gfw --> gui apps 

# # # # # # # # # # # # # 2 apps 

# # # # # # # # # # # # # scripting for automation 
# # # # # # # # # # # # # 	devops cloud 
# # # # # # # # # # # # # 	set of tools 
# # # # # # # # # # # # # 	python scripts 

# # # # # # # # # # # # # 	ruby , perl , shell 

# # # # # # # # # # # # # scripting
# # # # # # # # # # # # # 	browser level ( client side ) --> js 
# # # # # # # # # # # # # 	app level ( servide side ) --> php , java , python , ruby , .net 
# # # # # # # # # # # # # 	os level --> python	 , ruby 

# # # # # # # # # # # # # scientific computing
# # # # # # # # # # # # # 	advance operations 
# # # # # # # # # # # # # 	adv algos 
# # # # # # # # # # # # # 	ML / DL / DS / AI

# # # # # # # # # # # # # 	R , MATLAB , Sass 

# # # # # # # # # # # # # 	MATLAB , sass --> paid 
# # # # # # # # # # # # # 	R --> difficult ( C ++ )

# # # # # # # # # # # # # Py --> version --> 3.7 --> latest stable version  --> py3 
# # # # # # # # # # # # # Py --> version --> 2.7 --> mostly used stable version  --> py2 

# # # # # # # # # # # # # py2 --> architectural change --> py3 
# # # # # # # # # # # # # XXX py2 --> py3 XXX
# # # # # # # # # # # # # XXX py3 --> py2 XXX 

# # # # # # # # # # # # # installation 
# # # # # # # # # # # # # 	linux / mac --> pre installation of py2 --> upgrade 
# # # # # # # # # # # # # 	windows --> python.org --> download -> run 


# # # # # # # # # # # # # __ set path for python
# # # # # # # # # # # # # __ install pip 

# # # # # # # # # # # # # cmd / terminal 
# # # # # # # # # # # # # --------------

# # # # # # # # # # # # # c/desktop:>python 
# # # # # # # # # # # # # ---------
# # # # # # # # # # # # # ----------
# # # # # # # # # # # # # ----------
# # # # # # # # # # # # # >>> 

# # # # # # # # # # # # # c/desktop:>python3
# # # # # # # # # # # # # ---------
# # # # # # # # # # # # # ----------
# # # # # # # # # # # # # ----------
# # # # # # # # # # # # # >>> 

# # # # # # # # # # # # # features 
# # # # # # # # # # # # # --------
# # # # # # # # # # # # # open source  --> free 
# # # # # # # # # # # # # interpreted 
# # # # # # # # # # # # # dynamically typed 
# # # # # # # # # # # # # easy syntax 
# # # # # # # # # # # # # strictly intended 
# # # # # # # # # # # # # cross platform --> all os 
# # # # # # # # # # # # # extensive libs 

# # # # # # # # # # # # # executions 
# # # # # # # # # # # # # 	compiled vs interpreted
# # # # # # # # # # # # # 	c,cpp,java vs python 

# # # # # # # # # # # # # compiled --> c -> 100 lines --> 13 19 40 errors 
# # # # # # # # # # # # # 100 ->compile->errors(13 19 40) --> fix -> compile -> compiled file ->run --> 100 % output

# # # # # # # # # # # # # interpreted -> python -> 100 lines --> 13 19 40 errors
# # # # # # # # # # # # # 100->interpret->op till 12,error at 13->fix 13->interpret->op till 18 error 19 -> fix 19 interpret->op till 39 error at 40 -> fix 40-> interpret --> 100 % op 

# # # # # # # # # # # # # dynamically typed 
	
# # # # # # # # # # # # # 10        int --> dynamically typing python
# # # # # # # # # # # # # int 10    int --> c cpp java 

# # # # # # # # # # # # # easy syntax 
# # # # # # # # # # # # # 	grammar of code 
# # # # # # # # # # # # # 	control flow chars 
# # # # # # # # # # # # # 	java  c cpp--> { } ;  
# # # # # # # # # # # # # 	python --> : 

# # # # # # # # # # # # # strictly indended
# # # # # # # # # # # # # 	indentation --> use of spaces 
# # # # # # # # # # # # # 	IndentationError 

# # # # # # # # # # # # # extensive libs 
# # # # # # # # # # # # # 	py --> web libs --> django 
# # # # # # # # # # # # # 	py --> GUI libs --> tkinter 
# # # # # # # # # # # # # 	scripting --> libs --> os , sys 
# # # # # # # # # # # # # 	s computing --> ext libs --> numpy , pandas , plt . . .

# # # # # # # # # # # # # python install 

# # # # # # # # # # # # keywords 
# # # # # # # # # # # # 	- pre defined words 
# # # # # # # # # # # # 	- specific purpose 
# # # # # # # # # # # # 	- immutable 
# # # # # # # # # # # # 	- XX modify XX delete XX add new 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 True None

# # # # # # # # # # # # identifiers 
# # # # # # # # # # # # 	- user defined words 
# # # # # # # # # # # # 	- naming components 
# # # # # # # # # # # # 	- naming rules 	
# # # # # # # # # # # # 		- start small case 
# # # # # # # # # # # # 		- start capital ( not recommended )
# # # # # # # # # # # # 		- XXX start number XXX
# # # # # # # # # # # # 		- XXX start symbol XXX  @ _ __ 
# # # # # # # # # # # # 		- use number 
# # # # # # # # # # # # 		- XX use symbol XX _ 

# # # # # # # # # # # # name , Age , email_address , mobile2 , @square  , _user , __password --> valid
# # # # # # # # # # # # $name , 3mobile ,user^name --> invalid

# # # # # # # # # # # # variables 
# # # # # # # # # # # # ---------
# # # # # # # # # # # # storage components
# # # # # # # # # # # # 	name  --> identifier
# # # # # # # # # # # # 	value --> data 
# # # # # # # # # # # # 	address --> location

# # # # # # # # # # # # syntax
# # # # # # # # # # # # ------
# # # # # # # # # # # # <varname> = <varvalue>
# # # # # # # # # # # a = 10 
# # # # # # # # # # # # id(<varname>) # location / reference 
# # # # # # # # # # # # id(a) # 4564876752
# # # # # # # # # # # # # type(<varname>) # data type of variable
# # # # # # # # # # # # type(a) # int 

# # # # # # # # # # # datatypes in python 
# # # # # # # # # # # 5 dtypes

# # # # # # # # # # # independent dtypes
# # # # # # # # # # # 	numbers 
# # # # # # # # # # # 	strings 

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

# # # # # # # # # # # special dtypes
# # # # # # # # # # # 	sets 
# # # # # # # # # # # 	frozensets 

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

# # # # # # # # # # # all whole --> int 
# # # # # # # # # # # all decimals --> float 
# # # # # # # # # # # a+ib / c+dj --> complex

# # # # # # # # # # # -------------int------------|--------------long--------------- py2 
# # # # # # # # # # # -------------int------------|--------------int---------------- py3
# # # # # # # # # # # | --> max possible integer   9223372036854775807

# # # # # # # # # # # >>>import sys 
# # # # # # # # # # # >>>sys.maxint  (py2)
# # # # # # # # # # # >>>sys.maxsize  (py3)

# # # # # # # # # # # numbers --> operations 

# # # # # # # # # # # operators in python 

# # # # # # # # # # # 6 

# # # # # # # # # # # only numbers
# # # # # # # # # # # 	arithmetic 
# # # # # # # # # # # 	comparision 
# # # # # # # # # # # 	logical 
# # # # # # # # # # # 	bitwise 

# # # # # # # # # # # except numbers
# # # # # # # # # # # 	membership 
# # # # # # # # # # # 	identity 

# # # # # # # # # # # arithmetic --> 7  --> values

# # # # # # # # # # # + 
# # # # # # # # # # # - 
# # # # # # # # # # # * 
# # # # # # # # # # # /  div
# # # # # # # # # # # // floor div 
# # # # # # # # # # # % 
# # # # # # # # # # # ** exponent

# # # # # # # # # # # a = 25 
# # # # # # # # # # # b = 6 

# # # # # # # # # # # py3 
# # # # # # # # # # # 	a/b 4.1666667 
# # # # # # # # # # # 	a//b 4 

# # # # # # # # # # # py2 
# # # # # # # # # # # 	a/b 4
# # # # # # # # # # # 	a//b 4 

# # # # # # # # # # # a = 25.0
# # # # # # # # # # # b = 6 
# # # # # # # # # # # py2 
# # # # # # # # # # # 	a/b 4.1666667
# # # # # # # # # # # 	a//b 4 


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

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

# # # # # # # # # # # truthtables 

# # # # # # # # # # # ip1    ip2     ip1 and ip2 
# # # # # # # # # # # t       t            t 
# # # # # # # # # # # t       f            f 
# # # # # # # # # # # f       t            f 
# # # # # # # # # # # f       f            f 

# # # # # # # # # # # and --> ttt 


# # # # # # # # # # # ip1    ip2     ip1 or ip2 
# # # # # # # # # # # t       t           t 
# # # # # # # # # # # t       f           t  
# # # # # # # # # # # f       t           t 
# # # # # # # # # # # f       f           f 

# # # # # # # # # # # or --> fff 

# # # # # # # # # # # not(f) --> t 
# # # # # # # # # # # not(t) --> f 

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

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


# # # # # # # # # # # 10 and 20 
# # # # # # # # # # # t  and t ---> 20 
# # # # # # # # # # # 20 and 10 
# # # # # # # # # # # t  and t ---> 10 

# # # # # # # # # # # 10 or 20 
# # # # # # # # # # # t ----------> 10 
# # # # # # # # # # # 20 or 10 
# # # # # # # # # # # t ----------> 20 

# # # # # # # # # # # and or not 

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

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

# # # # # # # # # # # t --> 1 
# # # # # # # # # # # f --> 0 
# # # # # # # # # # # 			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 

# # # # # # # # # # # 23 & 32  --> 0 
# # # # # # # # # # # 20 | 30  --> 30

# # # # # # # # # # # ~ --> 2's complement 
# # # # # # # # # # # ~x --> -(x+1)
# # # # # # # # # # # ~25 --> -26 
# # # # # # # # # # # ~12 --> -13 
# # # # # # # # # # # ~(-9) --> 8

# # # # # # # # # # # right shift --> >>
# # # # # # # # # # # left shift --> <<

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

# # # # # # # # # # # 23 >> 3 --> 2
# # # # # # # # # # # 45 << 5 --> 160 / 214 / 1440

# # # # # # # # # # # 45  -->    00101101 << 5 -->   10100000
# # # # # # # # # # # 4 --> nibbles 
# # # # # # # # # # # 8 --> bytes 

# # # # # # # # # # # xor --> exclusive or --> ?? --> TT 

# # # # # # # # # # # strings 
# # # # # # # # # # # -------
# # # # # # # # # # # ' '
# # # # # # # # # # # " "
# # # # # # # # # # # alphanumeric 

# # # # # # # # # # # features 
# # # # # # # # # # # --------
# # # # # # # # # # # 	indexed 
# # # # # # # # # # # 	sliced 
# # # # # # # # # # # 	concatenated
# # # # # # # # # # # 	iterated 
# # # # # # # # # # # 	immutable 
# # # # # # # # # # # 	<class str>

# # # # # # # # # # # syntax
# # # # # # # # # # # ------
# # # # # # # # # # # <strname> = " <strvalue> "

# # # # # # # # # # tech = "python"


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

# # # # # # # # # # # indexing 
# # # # # # # # # # # <strname>[<index>]

# # # # # # # # # # # print(tech[3])
# # # # # # # # # # # print(tech[-3])
# # # # # # # # # # # print(tech[4])
# # # # # # # # # # # print(tech[0])
# # # # # # # # # # # print(tech[-4])

# # # # # # # # # # # slicing 

# # # # # # # # # # tech = "python and machine learning" # 7 8 9 
# # # # # # # # # # # print(tech[5])

# # # # # # # # # # # <strname>[<sindex> : <eindex>]
# # # # # # # # # # # print(tech[7:9]) # 7 8 
# # # # # # # # # # # print(tech[7:10]) # 7 8 9

# # # # # # # # # # # print(tech[0:6])
# # # # # # # # # # # print(tech[:10]) # 0 --> 6 
# # # # # # # # # # # print(tech[10:]) # 10 --> end 

# # # # # # # # # # # print(tech[5:15]) # 5 6 7 8 .... 14  --> +1 --> step
# # # # # # # # # # # # <strname>[<sindex> : <eindex> : <step>]
# # # # # # # # # # # print(tech[5:15:1])
# # # # # # # # # # # print(tech[5:15:2]) # 5 7 9 11 13 
# # # # # # # # # # # print(tech[::2]) # 0 2 4 ..... end 

# # # # # # # # # # # print(tech[-8:-4]) # -8 -7 -6 -5 
# # # # # # # # # # # print(tech[-8:]) 

# # # # # # # # # # # <strname>[<eindex> : <sindex> : - <step>]
# # # # # # # # # # # print(tech[10:5:-1]) # 10 9 8 7 6 
# # # # # # # # # # # print(tech[10:5:1]) 
# # # # # # # # # # # print(tech[6::-1]) # 6 5 4 3 2 1 0 
# # # # # # # # # # # print(tech[::-1]) # end ---> 0  # reversing of string 

# # # # # # # # # # # outputs in python 
# # # # # # # # # # # -----------------
# # # # # # # # # # # print() --> function --> py3  --> end
# # # # # # # # # # # print --> command --> py2 

# # # # # # # # # # # print 10 
# # # # # # # # # # # print(10)

# # # # # # # # # # # print(10)
# # # # # # # # # # # print(20)
# # # # # # # # # # # print(30)

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

# # # # # # # # # # # 102030

# # # # # # # # # # # concatenation 
# # # # # # # # # # # -------------
# # # # # # # # # # # + 

# # # # # # # # # # # tech = "python"
# # # # # # # # # # # db = "mysql"
# # # # # # # # # # # print(tech + " " + db)
# # # # # # # # # # # newvar = tech + " " + db
# # # # # # # # # # # print(newvar)

# # # # # # # # # # tech = "python"
# # # # # # # # # # version = 3
# # # # # # # # # # # print(tech + version)

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

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

# # # # # # # # # # # newvar = "%s %d" %(tech,version)
# # # # # # # # # # # print(newvar)

# # # # # # # # # # # name = "khan"
# # # # # # # # # # # marks = 80 
# # # # # # # # # # # year = 2018
# # # # # # # # # # # print("%s has secured %d marks in %d" %(name , marks , year))

# # # # # # # # # # # tech = "java"
# # # # # # # # # # # ver = 8.2
# # # # # # # # # # # year = 2019 
# # # # # # # # # # # print("the version of %s is %f in %d" %(tech,ver,year))

# # # # # # # # # # # name = "khan"
# # # # # # # # # # # perc = 80 
# # # # # # # # # # # year = 2018
# # # # # # # # # # # print("%s has secured %d %% marks in %d" %(name , perc , year))
# # # # # # # # # # # escape char --> % 

# # # # # # # # # # # type casting 
# # # # # # # # # # # 	change of dtypes 

# # # # # # # # # # tech = "python"
# # # # # # # # # # ver = 3 # ---> "3"

# # # # # # # # # # # str() --> number to string 
# # # # # # # # # # # int() --> string to number (not all)

# # # # # # # # # # # ver = str(ver)
# # # # # # # # # # # print(tech + ver)
# # # # # # # # # # # print(tech + str(ver)) # "python" + "3"

# # # # # # # # # # # special chars , escape chars 	

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

# # # # # # # # # # tech = "python and machine learning"
# # # # # # # # # # # print("p" in tech)
# # # # # # # # # # # print("l" in tech)
# # # # # # # # # # # print("learn" in tech)
# # # # # # # # # # # print("and" in tech)
# # # # # # # # # # # print("in" in tech)
# # # # # # # # # # # print("z" in tech)
# # # # # # # # # # # print("p" not in tech)
# # # # # # # # # # # print("zs" not in tech)

# # # # # # # # # # # identity operators --> 2 --> True / False
# # # # # # # # # # # is 
# # # # # # # # # # # is not 

# # # # # # # # # # # tech = "python"

# # # # # # # # # # # print(tech is "python")
# # # # # # # # # # # print(tech is "java")

# # # # # # # # # # # stmt = "i'm in a python session"
# # # # # # # # # # # print(stmt)

# # # # # # # # # # # \ --> escape char 
# # # # # # # # # # # stmt = 'i\'m in a python session'
# # # # # # # # # # # print(stmt)

# # # # # # # # # # # special chars
# # # # # # # # # # # \n , \t 

# # # # # # # # # # # para = "first \n second \n third \n fourth"
# # # # # # # # # # # print(para)

# # # # # # # # # # # tech = "python\tmachine\tlearning"
# # # # # # # # # # # print(tech)

# # # # # # # # # # # multi line string --> ''' '''

# # # # # # # # # # # book = '''first
# # # # # # # # # # # second 
# # # # # # # # # # # third
# # # # # # # # # # # py2 
# # # # # # # # # # # py3
# # # # # # # # # # # machine
# # # # # # # # # # # marks 
# # # # # # # # # # # folder 
# # # # # # # # # # # finally 
# # # # # # # # # # # gui 
# # # # # # # # # # # apps'''
# # # # # # # # # # # print(book)

# # # # # # # # # # # path = "c\\desktop\\code\\python\\programs\\newcode\\technology"
# # # # # # # # # # # print(path)

# # # # # # # # # # # raw strings --> paths , urls 

# # # # # # # # # # # path = r"c\desktop\code\python\programs\newcode\technology"
# # # # # # # # # # # print(path)

# # # # # # # # # # # unicode strings --> ??

# # # # # # # # # # # comments --> non executable lines 
# # # # # # # # # # # --> single line comment 
# # # # # # # # # # # multi line comments ---> ''' ''' 

# # # # # # # # # # '''
# # # # # # # # # # ----
# # # # # # # # # # -----
# # # # # # # # # # -----
# # # # # # # # # # -----
# # # # # # # # # # ----
# # # # # # # # # # '''

# # # # # # # # # # # num = 100 
# # # # # # # # # # # print(type(num))
# # # # # # # # # # # num = str(num)
# # # # # # # # # # # print(type(num))

# # # # # # # # # # # a = "1000"
# # # # # # # # # # # print(type(a)) 
# # # # # # # # # # # a = int(a)
# # # # # # # # # # # print(type(a)) 

# # # # # # # # # # # a = "abc"
# # # # # # # # # # # print(type(a)) 
# # # # # # # # # # # a = int(a)
# # # # # # # # # # # print(type(a)) 

# # # # # # # # # # # # ascii conversion	 

# # # # # # # # # # # "A" --> ascii value --> int 
# # # # # # # # # # # "c" --> ascii value --> int

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

# # # # # # # # # # # print(ord("a"))
# # # # # # # # # # # print(ord("A"))
# # # # # # # # # # # print(ord("p"))
# # # # # # # # # # # print(ord(" "))

# # # # # # # # # # # print(chr(100))
# # # # # # # # # # # print(chr(120))
# # # # # # # # # # # print(chr(75))

# # # # # # # # # # # inputs in python
# # # # # # # # # # # ----------------
# # # # # # # # # # # keyboard  --> input()
# # # # # # # # # # # CLI 

# # # # # # # # # # # user --> value --> code ---> output

# # # # # # # # # # # code run->input() --> user--> values --> input()--> code run->output-->print

# # # # # # # # # # # py3 
# # # # # # # # # # # user --> 100 --> input() --> code --> "100"
# # # # # # # # # # # user --> 3.6 --> input() --> code --> "3.6"
# # # # # # # # # # # user --> khan --> input() --> code --> "khan"

# # # # # # # # # # # py2 
# # # # # # # # # # # user --> 100 --> input() --> code --> 100
# # # # # # # # # # # user --> 3.6 --> input() --> code --> 3.6
# # # # # # # # # # # user --> "khan" --> input() --> code --> "khan"

# # # # # # # # # # # py2 
# # # # # # # # # # # user --> 100 --> raw_input() --> code --> "100"
# # # # # # # # # # # user --> 3.6 --> raw_input() --> code --> "3.6"
# # # # # # # # # # # user --> "khan" --> raw_input() --> code --> "khan"

# # # # # # # # # # # syntax
# # # # # # # # # # # ------
# # # # # # # # # # # <varname> = input("<something>")

# # # # # # # # # # # a = input("enter any input : ")
# # # # # # # # # # # print(a)
# # # # # # # # # # # print(type(a))

# # # # # # # # # # # num1 = int(input("enter a number : ")) # "100" --> 100
# # # # # # # # # # # num2 = int(input("enter a number : ")) # "200" --> 200
# # # # # # # # # # # print(num1 + num2) # 300

# # # # # # # # # # # enter a stmt 
# # # # # # # # # # # "python is easy"
# # # # # # # # # # # enter a char 
# # # # # # # # # # # "m"
# # # # # # # # # # # False

# # # # # # # # # # # enter a stmt 
# # # # # # # # # # # "python is easy"
# # # # # # # # # # # enter a char 
# # # # # # # # # # # "n"
# # # # # # # # # # # True

# # # # # # # # # # # stmt = input("enter a statement : ")
# # # # # # # # # # # char = input("enter a character : ")
# # # # # # # # # # # print(char in stmt)

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

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

# # # # # # # # # # tech = "Python and Machine learning."

# # # # # # # # # # # print(tech)
# # # # # # # # # # # <strname>.lower()
# # # # # # # # # # # print(tech.lower())
# # # # # # # # # # # <strname>.upper()
# # # # # # # # # # # print(tech.upper())
# # # # # # # # # # # <strname>.swapcase()
# # # # # # # # # # # print(tech.swapcase())
# # # # # # # # # # # <strname>.capitalize()
# # # # # # # # # # # print(tech.capitalize())
# # # # # # # # # # # <strname>.title()
# # # # # # # # # # # print(tech.title())

# # # # # # # # # # tech = "Python and Machine learning"

# # # # # # # # # # # <strname>.startswith(<char/substring>)
# # # # # # # # # # # print(tech.startswith("P"))
# # # # # # # # # # # print(tech.startswith("p"))
# # # # # # # # # # # print(tech.startswith("Pyt"))
# # # # # # # # # # # print(tech.startswith("Python and"))
# # # # # # # # # # # print(tech.startswith("p".upper()))

# # # # # # # # # # # <strname>.endswith(<char/substring>)
# # # # # # # # # # # print(tech.endswith("learning"))
# # # # # # # # # # # print(tech.endswith("g"))
# # # # # # # # # # # print(tech.endswith("python"))
# # # # # # # # # # # print(tech.endswith("ne learning"))
# # # # # # # # # # # print(tech.endswith("LEARNING".lower()))

# # # # # # # # # # # <strname>.isdigit()
# # # # # # # # # # # n = "python"
# # # # # # # # # # # print(n.isdigit())
# # # # # # # # # # # n = "100"
# # # # # # # # # # # print(n.isdigit())

# # # # # # # # # # # enter a statement
# # # # # # # # # # # "python is easy"
# # # # # # # # # # # enter a character
# # # # # # # # # # # "p"
# # # # # # # # # # # True

# # # # # # # # # # # enter a statement
# # # # # # # # # # # "python is easy"
# # # # # # # # # # # enter a character
# # # # # # # # # # # "PYTHON"
# # # # # # # # # # # True

# # # # # # # # # # # enter a statement
# # # # # # # # # # # "python is easy"
# # # # # # # # # # # enter a character
# # # # # # # # # # # "PYThon"
# # # # # # # # # # # True

# # # # # # # # # # # manipulative functions --> ???

# # # # # # # # # # # len(<strname>)
# # # # # # # # # # tech = "python and machine learning"
# # # # # # # # # # # print(len(tech))

# # # # # # # # # # # <strname>.count(<char/substring>)
# # # # # # # # # # # print(tech.count("a")) # 3
# # # # # # # # # # # print(tech.count(" ")) # 3
# # # # # # # # # # # print(tech.count("an")) # 1 
# # # # # # # # # # # print(tech.count("in")) # 2
# # # # # # # # # # # print(tech.count("z"))

# # # # # # # # # # # <strname>.index(<char/substring>)
# # # # # # # # # # # print(tech.index("p"))
# # # # # # # # # # # print(tech.index("python"))
# # # # # # # # # # # print(tech.index("n")) # 0 1 2 3 4 5 --> 5 
# # # # # # # # # # # print(tech.index("n" , 6)) # 6 7 8 -->8 
# # # # # # # # # # # print(tech.index("n" , 9)) # 9 ---> 
# # # # # # # # # # # print(tech.index("n" , 17)) # 17 ---> 
# # # # # # # # # # # print(tech.index("n" , 24)) # 24 ---> 
# # # # # # # # # # # print(tech.index("z")) # error 

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

# # # # # # # # # # # <strname>.find(<char/substring>)
# # # # # # # # # # # print(tech.find("m"))
# # # # # # # # # # # print(tech.find("z"))

# # # # # # # # # # # <strname>.replace(<old> , <new>)
# # # # # # # # # # # print(tech.replace("python" , "java"))
# # # # # # # # # # # print(tech)
# # # # # # # # # # # print(tech.replace("n" , "m"))
# # # # # # # # # # # print(tech.replace("n" , "m" , 3))

# # # # # # # # # # tech = "python and machine learning"
# # # # # # # # # # # <strname>.split()
# # # # # # # # # # # print(tech.split())

# # # # # # # # # # # <strname>.split(<delimiter>)
# # # # # # # # # # # print(tech.split("n"))
# # # # # # # # # # # print(tech.split("and"))

# # # # # # # # # # # words = tech.split() 
# # # # # # # # # # # print(words)

# # # # # # # # # # # <delimiter>.join(<collection>)
# # # # # # # # # # # print(" ".join(words))
# # # # # # # # # # # print("_".join(words))
# # # # # # # # # # # print(" - ".join(words))

# # # # # # # # # # # stmt = "    in india we live    "
# # # # # # # # # # # print(stmt)

# # # # # # # # # # # <strname>.strip()
# # # # # # # # # # # print(stmt.strip())
# # # # # # # # # # # <strname>.rstrip()
# # # # # # # # # # # print(stmt.rstrip())
# # # # # # # # # # # <strname>.lstrip()
# # # # # # # # # # # print(stmt.lstrip())

# # # # # # # # # # # <strname>.strip()
# # # # # # # # # # # print(stmt.strip(" i"))
# # # # # # # # # # # print(stmt.strip("e "))
# # # # # # # # # # # print(stmt.strip("live ")) --> ???
# # # # # # # # # # # print(stmt.strip(" in"))

# # # # # # # # # # # conditional statements
# # # # # # # # # # # 	if  --> 1 statement
# # # # # # # # # # # 	if else --> 2 statements
# # # # # # # # # # # 	if elif elif . . .  else  --> 4 statements

# # # # # # # # # # # syntax
# # # # # # # # # # # ------
# # # # # # # # # # # if <condition>:
# # # # # # # # # # # 	<statements>

# # # # # # # # # # # if <condition>:
# # # # # # # # # # # 	<statements1>
# # # # # # # # # # # else:
# # # # # # # # # # # 	<statements2>

# # # # # # # # # # # if <condition>:
# # # # # # # # # # # 	<statements>
# # # # # # # # # # # elif <condition2>:
# # # # # # # # # # # 	<statements2>
# # # # # # # # # # # elif <condition3>:
# # # # # # # # # # # 	<statements3>
# # # # # # # # # # # .
# # # # # # # # # # # .
# # # # # # # # # # # .
# # # # # # # # # # # else:
# # # # # # # # # # # 	<statements4>

# # # # # # # # # # # a = 0 
# # # # # # # # # # # if a>1:
# # # # # # # # # # # 	print("a gt 1")

# # # # # # # # # # # a = 10 
# # # # # # # # # # # if a>1:
# # # # # # # # # # # 	print("a gt 1")
# # # # # # # # # # # else:
# # # # # # # # # # # 	print("a lt 1")

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

# # # # # # # # # # # even / odd 

# # # # # # # # # # # n = input("enter a number : ")

# # # # # # # # # # # if n%2 == 0 :
# # # # # # # # # # # 	print("even")
# # # # # # # # # # # else:
# # # # # # # # # # # 	print("odd")

# # # # # # # # # # # n --> int , str ???
# # # # # # # # # # # 	n --> str --> XX 
# # # # # # # # # # # 	n --> int --> even , odd ???

# # # # # # # # # # # n = input("enter a number : ")

# # # # # # # # # # # if n.isdigit():
# # # # # # # # # # # 	n = int(n)
# # # # # # # # # # # 	if n%2 == 0 :
# # # # # # # # # # # 		print("even")
# # # # # # # # # # # 	else:
# # # # # # # # # # # 		print("odd")
# # # # # # # # # # # else:
# # # # # # # # # # # 	print("pass only numbers")

# # # # # # # # # # # enter a statement
# # # # # # # # # # # python is easy language
# # # # # # # # # # # enter a char 
# # # # # # # # # # # m 
# # # # # # # # # # # m not in statement

# # # # # # # # # # # enter a statement
# # # # # # # # # # # python is easy language
# # # # # # # # # # # enter a char 
# # # # # # # # # # # n
# # # # # # # # # # # repetitions of n is 2 
# # # # # # # # # # # index of n is 5 

# # # # # # # # # # # enter a statement
# # # # # # # # # # # python is easy language
# # # # # # # # # # # enter a char 
# # # # # # # # # # # P
# # # # # # # # # # # repetitions of p is 1 
# # # # # # # # # # # index of p is 0 

# # # # # # # # # # # enter a dialouge
# # # # # # # # # # # python is easy language
# # # # # # # # # # # enter a word 
# # # # # # # # # # # easy
# # # # # # # # # # # enter new word 
# # # # # # # # # # # difficult 
# # # # # # # # # # # python is difficult language 

# # # # # # # # # # # enter a dialouge
# # # # # # # # # # # python is easy language
# # # # # # # # # # # enter a word 
# # # # # # # # # # # java 
# # # # # # # # # # # java not in dialouge

# # # # # # # # # # # 3 , 5 
# # # # # # # # # # # enter a number 
# # # # # # # # # # # 10 
# # # # # # # # # # # 10 is multiple of 5 only 
# # # # # # # # # # # enter a number 
# # # # # # # # # # # 12 
# # # # # # # # # # # 12 is multiple of 3 only 
# # # # # # # # # # # enter a number 
# # # # # # # # # # # 15 
# # # # # # # # # # # 15 is multiple of 3 and 5 
# # # # # # # # # # # enter a number 
# # # # # # # # # # # 11
# # # # # # # # # # # 11 is not a multiple of 3 and 5 
# # # # # # # # # # # enter a number 
# # # # # # # # # # # abc 
# # # # # # # # # # # invalid inputs passed

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

# # # # # # # # # # # enter time in hh:mm:ssFF format
# # # # # # # # # # # 08:12:45am 
# # # # # # # # # # # 08:12:45 
# # # # # # # # # # # enter time in hh:mm:ssFF format
# # # # # # # # # # # 08:12:45pm 
# # # # # # # # # # # 20:12:45 
# # # # # # # # # # # enter time in hh:mm:ssFF format
# # # # # # # # # # # 8:12:45am 
# # # # # # # # # # # invalid format

# # # # # # # # # # # 1. arithmetic
# # # # # # # # # # # 2. comparision
# # # # # # # # # # # 3. logical
# # # # # # # # # # # enter a category 1 

# # # # # # # # # # # 1. add 
# # # # # # # # # # # 2. sub 
# # # # # # # # # # # 3. mul 
# # # # # # # # # # # 4. div 
# # # # # # # # # # # enter an operation 3

# # # # # # # # # # # enter a number : 100
# # # # # # # # # # # enter a number : 20
# # # # # # # # # # # 2000

# # # # # # # # # # loops 
# # # # # # # # # # 	- repetitions
# # # # # # # # # # 	- iterations 

# # # # # # # # # # finite 
# # # # # # # # # # infinite 

# # # # # # # # # # initialisation 
# # # # # # # # # # limit/condition
# # # # # # # # # # inc/dec 
# # # # # # # # # # statements

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

# # # # # # # # # # for --> numbers --> range()

# # # # # # # # # # range(<endpoint>) # 0 1 2 3 4 ..... endpoint-1
# # # # # # # # # # range(10) # 0 1 2 3 4 ...9 initialisation = 0 , limit = 9 , step = +1 

# # # # # # # # # # range(<spoint>,<endpoint>) # spoint , spoint+1 ..... endpoint-1
# # # # # # # # # # range(5,10) # 5 6 7 8 9 initialisation = 5 , limit = 9 , step = +1 

# # # # # # # # # # range(<spoint>,<endpoint>,<step>) # spoint , spoint+step ..... endpoint-1
# # # # # # # # # # range(1,10,2) # 1 3 5 7 9 initialisation = 1 limit=9 step = +2

# # # # # # # # # # range(<endpoint>,<spoint>,-<step>) 
# # # # # # # # # # range(10,5,-1) # 10 9 8 7 6 initialisation=10 limit = 6 step = -1 

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

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

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

# # # # # # # # # # for i in range(10): 
# # # # # # # # # # 	print(i , end="")

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

# # # # # # # # # # for i in range(3,15,2): 
# # # # # # # # # # 	print(i)

# # # # # # # # # # for i in range(13,7,-1): 
# # # # # # # # # # 	print(i)

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


# # # # # # # # # # patterns 
# # # # # # # # # # --------

# # # # # # # # # # n --> 5 

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

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

# # # # # # # # # # n = 6
# # # # # # # # # # 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 = 8 

# # # # # # # # # # a
# # # # # # # # # # bb 
# # # # # # # # # # ccc 
# # # # # # # # # # dddd
# # # # # # # # # # eeeee

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

# # # # # # # # # # ascii values--> ???

# # # # # # # # # # enter a start number 10 
# # # # # # # # # # enter an end number 17

# # # # # # # # # # 10 is even number 
# # # # # # # # # # 11 is odd number 
# # # # # # # # # # .
# # # # # # # # # # .
# # # # # # # # # # .
# # # # # # # # # # 17 is odd number 

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

# # # # # # # # # # n --> 4
# # # # # # # # # # 00 00 00
# # # # # # # # # # 01 01 01 
# # # # # # # # # # 02 04 08 
# # # # # # # # # # 03 09 27 
# # # # # # # # # # 04 16 64 

# # # # # # # # # # n = 10
# # # # # # # # # # 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 --> 12 --> composite  1 2 3 4 6 12 
# # # # # # # # # # n --> 13 --> prime  1 13

# # # # # # # # # # 12 % 1 == 0 
# # # # # # # # # # 12 % 2 == 0 
# # # # # # # # # # 12 % 3 == 0 
# # # # # # # # # # .
# # # # # # # # # # .
# # # # # # # # # # .
# # # # # # # # # # 12 % 12 == 0 

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


# # # # # # # # # # s = 10 
# # # # # # # # # # e = 20 

# # # # # # # # # # for j in range(s,e+1): # 10 11 12 ... 20 
# # # # # # # # # # 	c = 0 
# # # # # # # # # # 	for i in range(1,j+1):
# # # # # # # # # # 		if j%i == 0:
# # # # # # # # # # 			c = c+1
# # # # # # # # # # 	if c>2:
# # # # # # # # # # 		print(str(j)+" is composite")
# # # # # # # # # # 	else:
# # # # # # # # # # 		print(str(j)+" is prime")

# # # # # # # # # n = 5 
# # # # # # # # # # 1
# # # # # # # # # # 12 
# # # # # # # # # # 123
# # # # # # # # # # 1234
# # # # # # # # # # 12345


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

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

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


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

# # # # # # # # # # for j in range(ord("a") , ord("a")+n): # 97 -- 102 
# # # # # # # # # # 	for i in range(ord("a") , j+1): # 97 , 97 98 , 97 98 99 .. .  
# # # # # # # # # # 		print(chr(i), end ="")
# # # # # # # # # # 	print()

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

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

# # # # # # # # # # for --> strings 

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

# # # # # # # # # # n --> 5 

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


# # # # # # # # # tech = "python"

# # # # # # # # # # for i in range(len(tech)):
# # # # # # # # # # 	print(tech[i])

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

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

# # # # # # # # # stmt = "Python is an EASY language"
# # # # # # # # # # aeiou 
# # # # # # # # # # o i a E A a e 

# # # # # # # # # # for i in stmt:
# # # # # # # # # # 	if i=="a" or i=="e" or i=="i" or i=="o" or i=="u" :
# # # # # # # # # # 		print(i)

# # # # # # # # # # vowels = "aeiou"

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

# # # # # # # # # stmt = "Python is an easy language"
# # # # # # # # # char = "n"

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

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

# # # # # # # # # # user --> 10.23
# # # # # # # # # # 10 
# # # # # # # # # # 23

# # # # # # # # # # user --> 234812.2332
# # # # # # # # # # 234812
# # # # # # # # # # 2332

# # # # # # # # # # user --> abc.23
# # # # # # # # # # invalid inputs 

# # # # # # # # # # user --> abc.def
# # # # # # # # # # invalid inputs 

# # # # # # # # # # user --> 812.2332.3438
# # # # # # # # # # 812
# # # # # # # # # # 2332
# # # # # # # # # # 3438

# # # # # # # # # # num = "10.24.34.23"

# # # # # # # # # # num = str(num)
# # # # # # # # # # count = num.count(".") # 2 
# # # # # # # # # # index1 = num.index(".")

# # # # # # # # # # if num[:index].isdigit() and num[index+1:].isdigit():
# # # # # # # # # # 	print(num[:index])
# # # # # # # # # # 	print(num[index+1:])
# # # # # # # # # # else:
# # # # # # # # # # 	print("invalid inputs ")




# # # # # # # # # stmt = "python and machine learning"
# # # # # # # # # # for i in stmt:
# # # # # # # # # # 	print(i + " " +str(stmt.index(i)))
# # # # # # # # # char = "n"
# # # # # # # # # # 5 , 8 , __, __, __  

# # # # # # # # # # char = " "
# # # # # # # # # # __ , __ ,__

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

# # # # # # # # # # stmt = "python is easy programming language"
# # # # # # # # # # char = "n"
# # # # # # # # # # ind = -1
# # # # # # # # # # for i in stmt:
# # # # # # # # # # 	if i == char:
# # # # # # # # # # 		ind = stmt.index(char , ind+1)
# # # # # # # # # # 		print(ind)

# # # # # # # # # # n --> 4 
# # # # # # # # # # char --> h 

# # # # # # # # # # h 
# # # # # # # # # # hi 
# # # # # # # # # # hij 
# # # # # # # # # # hijk 

# # # # # # # # # # n --> 3
# # # # # # # # # # char --> m

# # # # # # # # # # mno 
# # # # # # # # # # nop 
# # # # # # # # # # opq 

# # # # # # # # # # while
# # # # # # # # # 	# initialisation
# # # # # # # # # 	# limit
# # # # # # # # # 	# inc/dec
# # # # # # # # # 	# statements

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

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

# # # # # # # # # # a = 1 # initialisation
# # # # # # # # # # while a<10: # condition
# # # # # # # # # # 	print(a) # statement
# # # # # # # # # # 	a = a + 1 # inc

# # # # # # # # # # a = 10 # initialisation
# # # # # # # # # # while a>0: # condition
# # # # # # # # # # 	print(a) # statement
# # # # # # # # # # 	a = a - 1 # dec

# # # # # # # # # # infinite

# # # # # # # # # # a = 1
# # # # # # # # # # while a>0:
# # # # # # # # # # 	print(a) # 1 1 1 1 1 1 1 ....
# # # # # # # # # # XXX inc / dec XXX 

# # # # # # # # # # while True:
# # # # # # # # # # 	print("hello")

# # # # # # # # # # control statements
# # # # # # # # # # pass 
# # # # # # # # # # break 
# # # # # # # # # # continue 

# # # # # # # # # # a = 10
# # # # # # # # # # if a>5:
# # # # # # # # # # 	pass
# # # # # # # # # # else:
# # # # # # # # # # 	print("bye")

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

# # # # # # # # # # break 
# # # # # # # # # 	# loop
# # # # # # # # # 	# condition --> True

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

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

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

# # # # # # # # # # stmt = "python is an easy programming language"
# # # # # # # # # # for i in stmt:
# # # # # # # # # # 	if i == "n":
# # # # # # # # # # 		break
# # # # # # # # # # 	print(i)

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

# # # # # # # # # # continue

# # # # # # # # # # for i in range(10):
# # # # # # # # # # 	if i == 5 :
# # # # # # # # # # 		continue
# # # # # # # # # # 	print(i) # 012346789

# # # # # # # # # # stmt = "python is an easy programming language"
# # # # # # # # # # for i in stmt:
# # # # # # # # # # 	if i == "n":
# # # # # # # # # # 		continue
# # # # # # # # # # 	print(i)

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

# # # # # # # # # # 0 5 10 15 ....95 
# # # # # # # # # # range 
# # # # # # # # # # range + if 
# # # # # # # # # # range + continue

# # # # # # # # # # while 
# # # # # # # # # # while + continue


# # # # # # # # # module 2 collections
# # # # # # # # # --------------------
# # # # # # # # # sequences 

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

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

# # # # # # # # # features
# # # # # # # # # 	1 X n 
# # # # # # # # # 	1d arrays 
# # # # # # # # # 	stacks
# # # # # # # # # 	class

# # # # # # # # # stack vs queue 

# # # # # # # # # lists
# # # # # # # # # 	i s c i 
# # # # # # # # # 	mutable
# # # # # # # # # 	<class list>
# # # # # # # # # 	repetitions
# # # # # # # # # 	heterogeneous
# # # # # # # # # sequential / ordered 

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

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

# # # # # # # # # nums = [1,2,3,2,4,5,4,6,57,323,342]
# # # # # # # # # print(nums)
# # # # # # # # # print(type(nums))

# # # # # # # # mixed = [34.9,"python" , 10,"mysql" , "java","hyd" , 23, 19 , 13]
# # # # # # # # # print(mixed)
# # # # # # # # # print(type(mixed))

# # # # # # # # # <listname>[<index>]
# # # # # # # # # print(mixed[3])
# # # # # # # # # print(mixed[-2])
# # # # # # # # # print(mixed[0])

# # # # # # # # # <listname>[<sindex> : <eindex>]
# # # # # # # # # print(mixed[3:6])
# # # # # # # # # print(mixed[:4])
# # # # # # # # # print(mixed[4:])

# # # # # # # # # print(mixed[::2])
# # # # # # # # # print(mixed[::-1])

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

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

# # # # # # # # nl = [34.9,"python" , [10,"mysql" , "java"],"hyd" , [23, 19] , 13]
# # # # # # # # # print(nl)
# # # # # # # # # print(nl[1])
# # # # # # # # # print(nl[2])
# # # # # # # # # print(nl[2][2])

# # # # # # # # # XXXprint(nl[2,2]) # arrays 

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

# # # # # # # # # mutable --> add , remove , modify

# # # # # # # # mixed = [34.9,"python" , 10,"mysql" , "java","hyd" , 23, 19 , 13]

# # # # # # # # # del <listname>[<index>]
# # # # # # # # # print(mixed)
# # # # # # # # # del mixed[3] # mysql 
# # # # # # # # # del mixed[2] # 10 
# # # # # # # # # del mixed[5] # 19 
# # # # # # # # # print(mixed) # mysql , 10 , 19 
# # # # # # # # # print(mixed)
# # # # # # # # # del mixed[3:6]
# # # # # # # # # print(mixed)

# # # # # # # # # <listname>[<index>] = <newvalue>
# # # # # # # # # print(mixed)
# # # # # # # # # mixed[2] = "C++" # indexing
# # # # # # # # # print(mixed)
# # # # # # # # # mixed[6:] = "aa" , 100 , 200 # slicing
# # # # # # # # # print(mixed)

# # # # # # # # # adding 
# # # # # # # # # 	<listname>.append(<element>)
# # # # # # # # # 	<listname>.insert(<index>, <element>)

# # # # # # # # # print(mixed)
# # # # # # # # # mixed.append(100)
# # # # # # # # # print(mixed)
# # # # # # # # # mixed.append("C++")
# # # # # # # # # print(mixed)

# # # # # # # # # print(mixed)
# # # # # # # # # mixed.insert(3,"abc")
# # # # # # # # # print(mixed)

# # # # # # # # # a = mixed.append(200)
# # # # # # # # # print(a) # None

# # # # # # # # # a = mixed.insert(3,"abc")
# # # # # # # # # print(a) # None

# # # # # # # # # list functions --> 190819

# # # # # # # # # mixed = [34.9,"python" , 10,"mysql" , "java","hyd" , 23, 19 , 13]
# # # # # # # # # print(len(mixed))

# # # # # # # # # print(mixed.index("python"))
# # # # # # # # # print(mixed.index(19))

# # # # # # # # # print(mixed.count("python"))

# # # # # # # # # mixed = [34.9,"python" , 10,"mysql" , "java","hyd" , 23, 19 , 13]
# # # # # # # # # print(mixed)
# # # # # # # # # del mixed[3]
# # # # # # # # # print(mixed)
# # # # # # # # # del mixed[mixed.index(19)] # del mixed[7]
# # # # # # # # # print(mixed)

# # # # # # # # # <listname>.pop()
# # # # # # # # # mixed.pop()
# # # # # # # # # print(mixed)
# # # # # # # # # mixed.pop()
# # # # # # # # # print(mixed)
# # # # # # # # # mixed.pop()
# # # # # # # # # print(mixed)

# # # # # # # # # <listname>.remove(<element>)
# # # # # # # # # mixed.remove("mysql")
# # # # # # # # # print(mixed)
# # # # # # # # # mixed.remove("hyd")
# # # # # # # # # print(mixed)

# # # # # # # # l1 = [213,56,4,5,6,7,87,8,7,5,32,5,3,354,56,7,6,21]
# # # # # # # # # print(l1)
# # # # # # # # # <listname>.sort() # ascending
# # # # # # # # # l1.sort()
# # # # # # # # # print(l1)
# # # # # # # # # <listname>.reverse()
# # # # # # # # # l1.reverse()
# # # # # # # # # print(l1)

# # # # # # # # # descending --> sort() + reverse()

# # # # # # # # # l1.sort(reverse = True) # descending
# # # # # # # # # print(l1)

# # # # # # # # # mixed = ["python" ,"mysql" , "java","hyd" ,10]
# # # # # # # # # mixed.sort()
# # # # # # # # # print(mixed)

# # # # # # # # # heterogeneous sort --> py2 
# # # # # # # # # XXX heterogeneous sort --> py3 XXX 

# # # # # # # # l1 = [213,56,4,5,6,7,87,8,7,5,32,5,3,354,56,7,6,21]

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

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

# # # # # # # # l1 = [21,3,3,56,4,5,6,7,87,8,7,5,32,5,3,354,56,7,6,21]
# # # # # # # # uni = []

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

# # # # # # # # # l1 = [21,[3,56,4],"python","hyd",[ 10,"mysql","java",7],5,32,[5,3,354],21]
# # # # # # # # # op = [] # int str 

# # # # # # # # # for i in l1:
# # # # # # # # # 	if type(i) is int or type(i) is str:
# # # # # # # # # 		op.append(i)
# # # # # # # # # 	else:
# # # # # # # # # 		for j in i:
# # # # # # # # # 			op.append(j)
# # # # # # # # # print(op)

# # # # # # # # # ip = [21, 4, 'python', 'hyd', 10, 'mysql', 'java', 7, 5, 3, 354, 21]
# # # # # # # # # nums = [3,5,0,2,7]
# # # # # # # # # op = []

# # # # # # # # # for i in nums:
# # # # # # # # # 	op.append(ip[i])
# # # # # # # # # print(op)

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

# # # # # # # # # op --> [[1,10] , [2,20] . . . [5,50]]

# # # # # # # # # snum --> 12 
# # # # # # # # # endnum --> 15 
# # # # # # # # # 12 [1,2,3,4,6,12] composite
# # # # # # # # # 13 [1,13] prime 
# # # # # # # # # .
# # # # # # # # # .
# # # # # # # # # 15 [1,3,5,15] composite

# # # # # # # # # for --> 12 13 14 15 
# # # # # # # # # []
# # # # # # # # # 12 --> [1,2,3,4,6,12] composite
# # # # # # # # # []
# # # # # # # # # 13 --> [1,13] prime

# # # # # # # # # <listname>.clear()

# # # # # # # # # tasks , tuples --> 200819


# # # # # # # # # ip = [21, 4, 'python', 'hyd', 10] # 5 
# # # # # # # # # nums = [3,5,0,2,7] # 5 

# # # # # # # # # # print(ip+nums)
# # # # # # # # # l3 = ip + nums 
# # # # # # # # # print(l3) # 10 

# # # # # # # # # list1.extend(list2)

# # # # # # # # # ip = [21, 4, 'python', 'hyd', 10] # 5 
# # # # # # # # # nums = [3,5,0,2,7] # 5 

# # # # # # # # # print(ip) # 5 
# # # # # # # # # print(nums) # 5 
# # # # # # # # # ip.extend(nums)
# # # # # # # # # print(ip) # 10
# # # # # # # # # print(nums) # 5 

# # # # # # # # # enter a number 
# # # # # # # # # 10 
# # # # # # # # # [1,2,3,4,5,6,7,8,9,10]
# # # # # # # # # [2,4,6,8,10]
# # # # # # # # # [1,4,9,16,.....100]
# # # # # # # # # [4,16,36,64,100]

# # # # # # # # # n = int(input("enter a number : "))
# # # # # # # # # nums = [] # initialisation
# # # # # # # # # for i in range(1,n+1): # iteration
# # # # # # # # # 	nums.append(i) # assignment 
# # # # # # # # # print(nums)

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

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

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

# # # # # # # # # list comprehensions 
# # # # # # # # n = 10 

# # # # # # # # # <listname> = [<assignment>  <iteration>]
# # # # # # # # # nums = [i for i in range(1,n+1)]
# # # # # # # # # print(nums)

# # # # # # # # # <listname> = [<assignment>  <iteration>  <condition>]
# # # # # # # # # evens = [i for i in range(1,n+1)  if i%2 ==0]
# # # # # # # # # print(evens)

# # # # # # # # # <listname> = [<operation + assignment>  <iteration>]
# # # # # # # # # sqs = [i**2 for i in range(1,n+1)]
# # # # # # # # # print(sqs)

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

# # # # # # # # # stmt --> python is an easy programming language
# # # # # # # # # [python , programming , language]

# # # # # # # # # stmt --> python is an easy programming language
# # # # # # # # # char --> m 
# # # # # # # # # [p , y ,t , o , n , s  . . . . .]

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

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

# # # # # # # # # python is an easy programming language
# # # # # # # # # n --> 2 
# # # # # # # # # ["python is" , "is an" , "an easy"]

# # # # # # # # # tuples
# # # # # # # # # 	collections
# # # # # # # # # 	ordered
# # # # # # # # # 	repetitions
# # # # # # # # # 	1Xn
# # # # # # # # # 	immutable
# # # # # # # # # 	i s c i 
# # # # # # # # # 	default collections
# # # # # # # # # 	<class tuple>
# # # # # # # # # 	stack

# # # # # # # # # syntax
# # # # # # # # # ------
# # # # # # # # # <tuplename> = (<ele1> , <ele2> , <ele3> , <ele4> . . . . .)

# # # # # # # # # ip = (21, 4, 'python', 'hyd', 10, 'mysql', 'java', 7)
# # # # # # # # # words = ("python is" , "is an" , "an easy")

# # # # # # # # # print(ip)
# # # # # # # # # print(type(ip))

# # # # # # # # # print(ip[4])
# # # # # # # # # print(ip[3:6])
# # # # # # # # # print(ip[-3])

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

# # # # # # # # # print(ip + words)

# # # # # # # # # ip[3] = 100 XXX
# # # # # # # # # del ip[3] XXX

# # # # # # # # # a = 10 
# # # # # # # # # b = 20 
# # # # # # # # # print(a)
# # # # # # # # # print(b)

# # # # # # # # # a,b = 10 ,20 
# # # # # # # # # print(a) # int 
# # # # # # # # # print(b) # int 

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

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

# # # # # # # # # XXX append() , insert() , pop() , remove() , sort() XXX
# # # # # # # # # len() index() count()

# # # # # # # # # consts , less modify 

# # # # # # # # # tuple --> list --> modify --> list --> tuple 
# # # # # # # # # tuple --> list ==> list()
# # # # # # # # # list --> tuple ==> tuple()

# # # # # # # # # fees = (10,20,40,25,35)
# # # # # # # # # print(fees)
# # # # # # # # # print(type(fees))
# # # # # # # # # fees = list(fees)
# # # # # # # # # print(fees)
# # # # # # # # # print(type(fees))
# # # # # # # # # fees[2] = 45
# # # # # # # # # print(fees)
# # # # # # # # # print(type(fees))
# # # # # # # # # fees = tuple(fees)
# # # # # # # # # print(fees)
# # # # # # # # # print(type(fees))

# # # # # # # # # nums = ([1,2,3,4],[10,20,30])
# # # # # # # # # ((1, 2, 3, 4), (10, 20, 30)) # op 
# # # # # # # # # nums = list(nums)
# # # # # # # # # for i in range(len(nums)):
# # # # # # # # # 	op.append(tuple(nums[i]))
# # # # # # # # # print(tuple(op))

# # # # # # # # # for i in range(len(nums)):
# # # # # # # # # 	nums.insert(i ,tuple(nums[i]))
# # # # # # # # # 	nums.pop()
# # # # # # # # # print(tuple(nums))

# # # # # # # # # t1 = (1,2,13,(4,3),565,(67,8,9),3,0,[32,4],5,6,)
# # # # # # # # # (1,2,13,4,3,565,67,8,9,3,0,32,4,5,6,) # op
# # # # # # # # # op = []
# # # # # # # # # for i in t1:
# # # # # # # # # 	if type(i) is tuple or type(i) is list:
# # # # # # # # # 		for j in i:
# # # # # # # # # 			op.append(j)
# # # # # # # # # 	else:
# # # # # # # # # 		op.append(i)
# # # # # # # # # print(tuple(op))

# # # # # # # # # dictionaries 
# # # # # # # # # 	mutable
# # # # # # # # # 	arbitary / unordered
# # # # # # # # # 	1Xn 
# # # # # # # # # 	class dict 
# # # # # # # # # 	i c i 

# # # # # # # # # employee --> name , age , role , mob1 , mob2 , pre , per , email

# # # # # # # # # emp1 = [khan , 30 , pd , 98 , 76 , hyd , hyd ,k@d.com] # 01234567
# # # # # # # # # emp2 = [john , 40 , d , 987 , hyd ,j@d.com] # 012357 --> 012345

# # # # # # # # # emp1[3] --> 98 --> mob1 
# # # # # # # # # emp2[3] --> 987 --> mob1 

# # # # # # # # # emp1[0] --> khan --> name
# # # # # # # # # emp2[0] --> john --> name

# # # # # # # # # emp1[5] --> hyd --> pre
# # # # # # # # # emp2[5] --> j@d.com --> email

# # # # # # # # # indices --> modify --> keys 
# # # # # # # # # values --> values 

# # # # # # # # # key + value --> item

# # # # # # # # # syntax
# # # # # # # # # ------
# # # # # # # # # <dictname> = {<k1>:<v1> , <k2>:<v2> , <k3>:<v3> , <k4>:<v4> }
# # # # # # # # # keys --> k1 , k2 , k3 , k4 
# # # # # # # # # values --> v1 , v2 , v3 , v4 

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

# # # # # # # # # d = {1:10 , 2:20 , 30:3 , 4:50 , 6:20 , 70:300 , 10:400}
# # # # # # # # # print(d)
# # # # # # # # # print(type(d))

# # # # # # # # # tech = {"python":3.7,"mysql":7.2,"php":8,"java":8,"pip":19,"python":2.7}
# # # # # # # # # print(tech)

# # # # # # # # # tech = {"python":3.7, "mysql":7.2, 8:"php", 8:"java", "pip":19}
# # # # # # # # # print(tech)


# # # # # # # # tech = {"python":3.7,"mysql":7.2,("php","java"):8,"pip":19}
# # # # # # # # # print(tech)

# # # # # # # # # indexing
# # # # # # # # # --------
# # # # # # # # # <dictname>[<key>]
# # # # # # # # # print(tech["python"])
# # # # # # # # # print(tech["pip"])
# # # # # # # # # print(tech[("php","java")])

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

# # # # # # # # # iterable functions
# # # # # # # # # ------------------
# # # # # # # # # list(<dictname>.keys())
# # # # # # # # # list(<dictname>.values())
# # # # # # # # # list(<dictname>.items())

# # # # # # # # # for k in tech.keys():
# # # # # # # # # 	print(k)

# # # # # # # # # for v in tech.values():
# # # # # # # # # 	print(v)

# # # # # # # # # for i in tech.items():
# # # # # # # # # 	print(i)

# # # # # # # # # print(list(tech.keys()))
# # # # # # # # # print(list(tech.values()))
# # # # # # # # # print(list(tech.items()))

# # # # # # # # tech = {"python":3.7,"mysql":5.6,"php":8,"pip":19}

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

# # # # # # # # # del <dictname>[<key>]
# # # # # # # # # del tech["php"]
# # # # # # # # # print(tech)

# # # # # # # # # enter a number 5 
# # # # # # # # # {0:0,1:1,2:4,3:9,4:16,5:25}

# # # # # # # # # d = {}
# # # # # # # # # n = 5 
# # # # # # # # # for i in range(n+1):
# # # # # # # # # 	d[i] = i**2 

# # # # # # # # # print(d)

# # # # # # # # # tech = {"python":3.7,"mysql":5.6,"php":8,"pip":19}
# # # # # # # # # print(len(tech))

# # # # # # # # # enter a start number 
# # # # # # # # # 10 
# # # # # # # # # enter a ending number 
# # # # # # # # # 20

# # # # # # # # # factors = {10:[1,2,5,10] , 11:[1,11] . . . .  20:[1,2,4,5,10,20]}

# # # # # # # # # functions
# # # # # # # # # ---------

# # # # # # # # tech = {"python":3.7,"mysql":5.6,"php":8,"pip":19}
# # # # # # # # # print(tech)

# # # # # # # # # print(len(tech))
# # # # # # # # # <dictname>.pop(<key>)
# # # # # # # # # tech.pop("mysql")
# # # # # # # # # print(tech)
# # # # # # # # # tech.pop("pip")
# # # # # # # # # print(tech)

# # # # # # # # # <dictname>.popitem(<key>)
# # # # # # # # # tech.popitem()
# # # # # # # # # print(tech)
# # # # # # # # # tech.popitem()
# # # # # # # # # print(tech)

# # # # # # # # # tech.clear()
# # # # # # # # # print(tech)

# # # # # # # # tech = {"python":3.7,"mysql":5.6,"php":8,"pip":19}
# # # # # # # # d = {1:10 , 2:20 , 30:3 , 4:50 , 6:20 , 70:300 , 10:400}

# # # # # # # # # print(tech + d) # error 

# # # # # # # # # <dict1>.update(<dict2>)
# # # # # # # # # print(tech) # 4 
# # # # # # # # # print(d) # 7 

# # # # # # # # # tech.update(d)

# # # # # # # # # print(tech) # 11
# # # # # # # # # print(d) # 7

# # # # # # # # # tech.update(d)

# # # # # # # # # print(tech) # 11
# # # # # # # # # print(d) # 7 

# # # # # # # # # l1 = [10,30,40,50]
# # # # # # # # # l2 = [100,40,500,70]

# # # # # # # # # # op = {10:100 , 30:40 , 40:500 , 50:70}
# # # # # # # # # op = {}

# # # # # # # # # if len(l1) == len(l2):
# # # # # # # # # 	for i in range(len(l1)):
# # # # # # # # # 		op[l1[i]] = l2[i]
# # # # # # # # # else:
# # # # # # # # # 	print("unequal lengths of lists")
# # # # # # # # # print(op)

# # # # # # # # # l1 = [10,30,40,50,60]
# # # # # # # # # l2 = [100,40,500,70]
# # # # # # # # # {10:100 , 30:40 , 40:500 , 50:70}
# # # # # # # # # extra elements : 60 

# # # # # # # # # zip()

# # # # # # # # l1 = [10,30,40,50,60]
# # # # # # # # l2 = [100,40,500,70,300,40]
# # # # # # # # l3 = [100,200,300,400,500]

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

# # # # # # # # # l = list(zo)
# # # # # # # # # print(l)

# # # # # # # # # t = tuple(zo)
# # # # # # # # # print(t)

# # # # # # # # # d = dict(zo)
# # # # # # # # # print(d)

# # # # # # # # # zo = zip(l1,l2,l3)
# # # # # # # # # print(list(zo))
# # # # # # # # # print(tuple(zo))
# # # # # # # # # print(dict(zo))

# # # # # # # # # l1 , l2 --> zip --> dict 
# # # # # # # # # dict -->.keys() .values()--> l1 , l2 

# # # # # # # # # stmt --> python is easy
# # # # # # # # # {"python":"qzuipo" , "is":"jt" , "easy":"fbtz"}

# # # # # # # # # dictionary comprehensions
# # # # # # # # # -------------------------

# # # # # # # # # d = {<assignment>  <iteration>}
# # # # # # # # # d = {<assignment>  <iteration>  <condition>}

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

# # # # # # # # # d = {i:j for i in range(10) for j in range(10,20)}
# # # # # # # # # print(d) # error 

# # # # # # # # # stmt = "python is an easy programming language"
# # # # # # # # # d = {word:len(word) for word in stmt.split()  if len(word)>4}
# # # # # # # # # print(d)

# # # # # # # # # sets and frozensets ---> 280819

# # # # # # # # # sets 
# # # # # # # # # 	mutable 
# # # # # # # # # 	i c 
# # # # # # # # # 	unique 
# # # # # # # # # 	<class set>
# # # # # # # # # 	arbitary
# # # # # # # # # 	py2.4 +

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

# # # # # # # # nums = {1,2,3,40,5,6,7,89,0,12}
# # # # # # # # # print(nums)
# # # # # # # # # print(type(nums))

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

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

# # # # # # # # # nums = set((1,2,3,40,5,6,7,89,0,12))
# # # # # # # # # print(nums)
# # # # # # # # # print(type(nums))

# # # # # # # # nums = {1,2,3,40,5,6,7,89,0,12}
# # # # # # # # # print(nums[3]) # 40
# # # # # # # # # for i in nums:
# # # # # # # # # 	print(i)

# # # # # # # # # nums = {1,2,1,2,3,4,5,5,6,2,3,4,21,11,1,3,40,5,6,7,89,0,12}
# # # # # # # # # print(nums)

# # # # # # # # nums = {1,2,3,40,5,6,7,89,0,12}
# # # # # # # # # print(nums)
# # # # # # # # # nums.add(100)
# # # # # # # # # print(nums)
# # # # # # # # # nums.add("python")
# # # # # # # # # print(nums)

# # # # # # # # # print(nums)
# # # # # # # # # nums.remove(89)
# # # # # # # # # print(nums)
# # # # # # # # # nums.remove(5)
# # # # # # # # # print(nums)
# # # # # # # # # nums.remove(100) # error 
# # # # # # # # # print(nums)

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


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

# # # # # # # # # print(s1.union(s2))
# # # # # # # # # print(s1.intersection(s2))
# # # # # # # # # print(s1.difference(s2))
# # # # # # # # # print(s2.difference(s1))

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

# # # # # # # # # print(s1 | s2)
# # # # # # # # # print(s1 & s2)
# # # # # # # # # print(s1 - s2)
# # # # # # # # # print(s2 - s1)

# # # # # # # # # print(s1 > s2)
# # # # # # # # # print(s2 > s3)
# # # # # # # # # print(s1 < s2)
# # # # # # # # # print(s3 < s2)

# # # # # # # # # frozensets --> ??
# # # # # # # # # 	immutable sets 

# # # # # # # # # lists --> tuples 
# # # # # # # # # sets --> frozensets

# # # # # # # # # functional programming 
# # # # # # # # # ----------------------
# # # # # # # # # 100 lines 3--> even/odd --> 10 lines 

# # # # # # # # # 1 
# # # # # # # # # - -
# # # # # # # # # --
# # # # # # # # # --
# # # # # # # # # --
# # # # # # # # # 50 --> 60 eo --> function
# # # # # # # # # --
# # # # # # # # # --
# # # # # # # # # 81 
# # # # # # # # # --
# # # # # # # # # --
# # # # # # # # # 91 

# # # # # # # # # functions
# # # # # # # # # 	- pre defined --> print() , len() , sort()
# # # # # # # # # 	- user defined

# # # # # # # # # definition 
# # # # # # # # # implementation
# # # # # # # # # function call

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

# # # # # # # # # def <funcname>(): # definition
# # # # # # # # # 	<logic> # implementation
# # # # # # # # # <funcname>() # call 1
# # # # # # # # # <funcname>() # call 2
# # # # # # # # # <funcname>() # call 3

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

# # # # # # # # # hello()
# # # # # # # # # hello()
# # # # # # # # # print(hello) # address
# # # # # # # # # print(type(hello))

# # # # # # # # parameters 				returntype 
# # # # # # # #  	0						0		--> sort()
# # # # # # # #  	1						0       --> append(<ele>)
# # # # # # # #  	0						1		--> pop()
# # # # # # # #  	1						1       --> len()

# # # # # # # # # parameters / arguments: 
# # # # # # # # # ----------------------
# # # # # # # # # formal --> variables --> definition
# # # # # # # # # actual --> values --> call 

# # # # # # # # # def login(name , password): # formal parameters
# # # # # # # # # 	print("user name is "+ name)
# # # # # # # # # 	print("user password is "+ password)

# # # # # # # # # login("john" , "12345") # actual parameters

# # # # # # # # # def hello():
# # # # # # # # # 	pass
# # # # # # # # # hello()

# # # # # # # # # def login(name , pwd): # formal parameters
# # # # # # # # # 	print("user name is "+ name)
# # # # # # # # # 	print("user password is "+ pwd)

# # # # # # # # # login("john" , "12345") # actual parameters
# # # # # # # # # login("120893" , "khan")
# # # # # # # # # login("jane" , "12345" , "lync")
# # # # # # # # # login("harry")

# # # # # # # # # 4 parameters
# # # # # # # # # 	positional / required 
# # # # # # # # # 	default 
# # # # # # # # # 	variable length 
# # # # # # # # # 	keyworded

# # # # # # # # # def login(name , pwd): # formal parameters
# # # # # # # # # 	print("user name is "+ name)
# # # # # # # # # 	print("user password is "+ pwd)

# # # # # # # # # login("12345" , "khan") # position
# # # # # # # # # login("john")
# # # # # # # # # login("jane" , "12345" , "lync")

# # # # # # # # # def avg(a,b,c,d,e):
# # # # # # # # # 	res = (a+b+c+d+e)//5
# # # # # # # # # 	print(res)
# # # # # # # # # avg(10,20,30,40,50) # 30
# # # # # # # # # avg(100,20,300,40,50) # 30

# # # # # # # # # def hello():
# # # # # # # # # 	print("hi")
# # # # # # # # # hello()
# # # # # # # # # def hello():
# # # # # # # # # 	print("bye")
# # # # # # # # # def hello():
# # # # # # # # # 	print("lync")
# # # # # # # # # hello()

# # # # # # # # # docstring 
# # # # # # # # # - meta data 

# # # # # # # # # def avg(a,b,c,d,e):
# # # # # # # # 	''' this function calculates average of 5 numbers '''
# # # # # # # # 	# res = (a+b+c+d+e)//5
# # # # # # # # 	# print(res)
# # # # # # # # # avg(10,20,30,40,50)

# # # # # # # # # print(<funcname>.__doc__)
# # # # # # # # # print(avg.__doc__)

# # # # # # # # # print(len.__doc__)
# # # # # # # # # print(list.sort.__doc__)
# # # # # # # # # print(print.__doc__)

# # # # # # # # # enter a stmt 
# # # # # # # # # "python is easy"
# # # # # # # # # enter a char 
# # # # # # # # # "n"
# # # # # # # # # 5 

# # # # # # # # # mean , median , mode 

# # # # # # # # # parameters --> 3 

# # # # # # # # def login(name , pwd): # formal parameters
# # # # # # # # 	print("user name is "+ name)
# # # # # # # # 	print("user password is "+ pwd)

# # # # # # # # login(pwd = "12345" , user = "khan")
# # # # # # # # login("john" , "9876")


# # # # # # # # def subscribe(user,acc = "free"):
# # # # # # # # 	print("username is "+ user)
# # # # # # # # 	print("subscription is "+ acc)

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


# # # # # # # # def subscribe(user,acc = "free"):
# # # # # # # # 	print("username is "+ user)
# # # # # # # # 	print("subscription is "+ acc)

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

# # # # # # # # makecake
# # # # # # # # 	flav shape wei 

# # # # # # # # def makecake(flav = "vanilla" , shape = "oval" , wei = "2"):
# # # # # # # # 	print("Flavour is " + flav)
# # # # # # # # 	print("Shape is " + shape)
# # # # # # # # 	print("Weight is " + wei)

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

# # # # # # # # variable length
# # # # # # # # ---------------
# # # # # # # # args / vars / abc
# # # # # # # # *args / *vars / *abc--> definition

# # # # # # # # def avg(*args):
# # # # # # # # 	print(args)
# # # # # # # # 	print(type(args))

# # # # # # # # avg(1,3)
# # # # # # # # avg(1,2,90)

# # # # # # # # def avg(*args):
# # # # # # # # 	res = sum(args)/len(args)
# # # # # # # # 	print(res)
# # # # # # # 	# res = 0 
# # # # # # # 	# for i in args:
# # # # # # # 	# 	res = res + i 
# # # # # # # 	# ans = res / len(args)
# # # # # # # # avg(1,3)
# # # # # # # # avg(1,2,90)
# # # # # # # # avg(1,2,4,5,6,7,8,9,6,4,3,2)
# # # # # # # # avg(20)
# # # # # # # # avg()

# # # # # # # # def avg(a,b,*args):

# # # # # # # # avg(1,3)
# # # # # # # # avg(1,2,90)
# # # # # # # # avg(1,2,4,5,6,7,8,9,6,4,3,2)
# # # # # # # # avg(20) # error
# # # # # # # # avg() # error

# # # # # # # # returntype , keyworded --> 060919

# # # # # # # # def makecake(flav = "vanilla" , shape = "oval" , wei = "2" , *args):
# # # # # # # # 	print("Flavour is " + flav)
# # # # # # # # 	print("Shape is " + shape)
# # # # # # # # 	print("Weight is " + wei)
# # # # # # # # 	print(args)

# # # # # # # # makecake("vanilla" , "round" , "4")
# # # # # # # # makecake("vanilla" , "round" , "4" , "almonds" , "sugar")

# # # # # # # # keyworded
# # # # # # # # 	dictionaries
# # # # # # # # 	kwargs / abcd
# # # # # # # # 	**kwargs / **abcd


# # # # # # # # def makecake(flav = "vanilla" , shape = "oval" , wei = "2" , **kwargs):
# # # # # # # # 	print("Flavour is " + flav)
# # # # # # # # 	print("Shape is " + shape)
# # # # # # # # 	print("Weight is " + wei)
# # # # # # # # 	print(kwargs)

# # # # # # # # makecake("vanilla" , "round" , "4")
# # # # # # # # makecake("vanilla" , "round" , "4" , toppings="almonds",icing="sugar")

# # # # # # # # positional --> variable length
# # # # # # # # default --> keyworded 

# # # # # # # # returntype
# # # # # # # # ----------
# # # # # # # # output of function
# # # # # # # # 	- value 
# # # # # # # # 	- variable
# # # # # # # # 	- functionname 
# # # # # # # # 	- functioncall 

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

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

# # # # # # # # no return --> None 

# # # # # # # # return value 

# # # # # # # # def addnums(a,b):
# # # # # # # # 	res = a+b 
# # # # # # # # 	print(res)
# # # # # # # # 	return "hello" 
# # # # # # # # 	return "hi" 
# # # # # # # # 	return "bye" 

# # # # # # # # addnums(10,20) # 30 
# # # # # # # # print(addnums(100,200)) # 300 100 
# # # # # # # # ans = addnums(100,200)
# # # # # # # # print(ans)

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

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

# # # # # # # # enter  number1 50 
# # # # # # # # enter  number2 10 

# # # # # # # # addnums(n1,n2) --> 60 
# # # # # # # # subnums(60,n2) --> 50 
# # # # # # # # mulnums(50,n2) --> 500 
# # # # # # # # divnums(500,n2) --> 50 

# # # # # # # n1 = 50 
# # # # # # # n2 = 10 
# # # # # # # def addnums(a,b):
# # # # # # # 	res = a+b 
# # # # # # # 	return res
# # # # # # # def subnums(a,b):
# # # # # # # 	res = a-b 
# # # # # # # 	return res
# # # # # # # def mulnums(a,b):
# # # # # # # 	res = a*b 
# # # # # # # 	return res
# # # # # # # def divnums(a,b):
# # # # # # # 	res = a//b 
# # # # # # # 	return res

# # # # # # # addres = addnums(n1,n2)
# # # # # # # subres = subnums(addres,n2)
# # # # # # # mulres = mulnums(subres,n2)
# # # # # # # divres = divnums(mulres,n2)
# # # # # # # print((addres , subres , mulres , divres))
# # # # # # # print(divnums(mulnums(subnums(addnums(n1,n2),n2),n2),n2))

# # # # # # # # return functionname

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

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


# # # # # # # # print(hello) # functionname address
# # # # # # # # print(bye) # functionname address

# # # # # # # # hello() # hello
# # # # # # # # bye() # bye

# # # # # # # # print(hello()) # functioncall hello + None
# # # # # # # # print(bye()) # functioncall bye + None

# # # # # # # # print(type(hello)) # type of functionname
# # # # # # # # print(type(bye)) # type of functionname

# # # # # # # # print(type(hello())) # type of functioncall  hello + nonetype
# # # # # # # # print(type(bye())) # type of functioncall bye + nonetype

# # # # # # def hello():
# # # # # # 	print("hello")
# # # # # # def bye():
# # # # # # 	print("bye")
# # # # # # 	return hello # functionname

# # # # # # # # first class objects

# # # # # # # d = bye()
# # # # # # # print(d)
# # # # # # # d()

# # # # # # # # print(bye)
# # # # # # # # print(bye()) # bye + address of hello
# # # # # # # # print(type(bye)) 
# # # # # # # # print(type(bye())) 

# # # # # # # # def hello():
# # # # # # # # 	print("hello")
# # # # # # # # 	return 100 
# # # # # # # # def bye():
# # # # # # # # 	print("bye")
# # # # # # # # 	return hello # functionname

# # # # # # # # print(bye)
# # # # # # # # print(bye()) # bye + address of hello
# # # # # # # # print(type(bye)) 
# # # # # # # # print(type(bye())) 

# # # # # # # # return functioncall --> 090919

# # # # # # # def hello():
# # # # # # # 	print("hello")
# # # # # # # def bye():
# # # # # # # 	print("bye")
# # # # # # # 	return hello() # functioncall
# # # # # # # print(hello)
# # # # # # # print(bye)
# # # # # # # hello()
# # # # # # # print(hello()) # hello + None
# # # # # # # bye() # bye + hello 
# # # # # # # print(bye()) # bye + hello + None
# # # # # # # print(type(bye()))

# # # # # # # def hello():
# # # # # # # 	print("hello")
# # # # # # # 	return 100
# # # # # # # def bye():
# # # # # # # 	print("bye")
# # # # # # # 	return hello() # functioncall
# # # # # # # print(hello())
# # # # # # # bye() # bye + hello 
# # # # # # # print(bye()) # bye + hello + 100
# # # # # # # print(type(bye()))
# # # # # # # a = bye()
# # # # # # # print(a)

# # # # # # # lambda functions / lambda operator / anonymous functions
# # # # # # # --------------------------------------------------------

# # # # # # # <functionname> = lambda <parameters> : <implementation>
# # # # # # # addnums = lambda a,b : (a+b)//a 
# # # # # # # print(addnums(10,20))
# # # # # # # addnums(10,20)
# # # # # # # makeemail = lambda user,company : user + "@"+company+".com"
# # # # # # # print(makeemail("khan","lync"))

# # # # # # # special functions
# # # # # # # -----------------
# # # # # # # map()
# # # # # # # filter()
# # # # # # # reduce()

# # # # # # # map()
# # # # # # # l1 = [3,4,5,2,1]

# # # # # # # def sq(i):
# # # # # # # 	res = i**2
# # # # # # # 	return res

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

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

# # # # # # # def addnums(a,b):
# # # # # # # 	return a+b
# # # # # # # mo = map(addnums , l1,l2)
# # # # # # # print(list(mo))

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

# # # # # # # print(map(lambda a,b:a+b,[i for i in range(5)],[i for i in range(5,10)]))

# # # # # # # l1 = {3,4,5,2,1}
# # # # # # # print(list(map(lambda a:a**2 ,l1)))

# # # # # # # filter , reduce --> 110919
# # # # # # # filter()
# # # # # # # l1 --> 10 
# # # # # # # even 
# # # # # # # op --> 10 <10
# # # # # # # l1 = [i for i in range(1,11)]
# # # # # # # fo = filter(lambda a:a%2==0 , l1)
# # # # # # # print(list(fo))

# # # # # # # reduce()
# # # # # # # 	cumulative 
# # # # # # # 	functools

# # # # # # # from functools import reduce
# # # # # # # l1 = [str(i) for i in range(1,11)]

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

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

# # # # # # # sum of list --> s = 0 
# # # # # # # s , i 
# # # # # # # product of list --> p = 1
# # # # # # # p , i 

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

# # # # # # # print(" ".join(l1))

# # # # # # module 3 part 2 
# # # # # # ---------------
# # # # # # file handling 

# # # # # # # module 3 part 3
# # # # # # # ---------------
# # # # # # # modules and packages 

# # # # # # file --> storage of data 
# # # # # # 		 history of data 
# # # # # # 		 XX dependency XX 

# # # # # # 3 components
# # # # # # 	-> filename 
# # # # # # 	-> extension 
# # # # # # 	-> address (sys path)

# # # # # # file object

# # # # # # types 			modules 
# # # # # # txt				  ---
# # # # # # html 			  --- 
# # # # # # pdf 			 pypdf2 
# # # # # # excel 			 xlsxwriter , pandas 
# # # # # # csv 			 csv , pandas 
# # # # # # image 			 PIL , pillow 
# # # # # # json 			 json 

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

# # # # # # open 
# # # # # # operate 
# # # # # # save 
# # # # # # close 

# # # # # # open() 
# # # # # # 	-> create + open  --> w 
# # # # # # 	-> open --> r / w

# # # # # # modes of operation --> 7 
# # # # # # r 
# # # # # # w 
# # # # # # a 
# # # # # # rb 
# # # # # # wb 
# # # # # # + 

# # # # # # close()

# # # # # # open()

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

# # # # # # fo = open("demo.txt","w")
# # # # # # fo.close()

# # # # # # with open("<file>" , "<mode>") as <fo>:

# # # # # # with open("demo.txt","r") as fo:
# # # # # # 	pass

# # # # # # operations --> files 
# # # # # # 	read 
# # # # # 	# write 

# # # # # # writing data on file 
# # # # # 	# strings

# # # # # 	# <fileobj>.write(<string>)
# # # # # 	# 	single string
# # # # # 	# 	0 start of file 
# # # # # 	# 	hello 
# # # # # 	# 	5 --> 0 + len(hello)
# # # # # 	# 	close 
# # # # # 	# 	0 start of file

# # # # # 	# <fileobj>.writelines(<collection>)

# # # # # # fw = open("demo.txt" , "w")
# # # # # # fw.write("hello\n") # 0 
# # # # # # fw.write("Bye") # 5  --> 8 
# # # # # # fw.close()

# # # # # # fw2 = open("demo.txt" , "w")
# # # # # # fw2.write("hai") # 0 --> 3
# # # # # # fw2.close()

# # # # # # fw = open("demo.txt" , "w")
# # # # # # l1 = [str(i)+"\n" for i in range(10)]
# # # # # # fw.writelines(l1)
# # # # # # mixed = ["python\n" ,"mysql\n" , "java\n","hyd\n" , "23\n"]
# # # # # # fw.writelines(mixed)
# # # # # # fw.close()

# # # # # # fw2 = open("demo.txt" , "a")
# # # # # # l1 = [str(i)+"\n" for i in range(10)]
# # # # # # fw2.writelines(l1)
# # # # # # fw2.close()

# # # # # # <fileobj>.read()

# # # # # # fr = open("demo.txt" , "r")
# # # # # # data = fr.read()
# # # # # # print(data)
# # # # # # fr.close()

# # # # # # <fileobj>.read(<integer>)
# # # # # # fr = open("demo.txt" , "r")
# # # # # # data = fr.read(3) # 0 
# # # # # # print(data)
# # # # # # data = fr.read(5) # 3 --> 8
# # # # # # print(data)
# # # # # # data = fr.read(12) # 8 --> 20
# # # # # # print(data)
# # # # # # data = fr.read() # 20 --> end 
# # # # # # print(data)
# # # # # # data = fr.read(3) 
# # # # # # print(data)
# # # # # # fr.close()

# # # # # # <fileobj>.readline()
# # # # # # fr = open("demo.txt" , "r")
# # # # # # print(fr.readline())
# # # # # # print(fr.readline())
# # # # # # print(fr.readline())
# # # # # # fr.close()

# # # # # # <fileobj>.readline(<integer>)
# # # # # # fr = open("demo.txt" , "r")
# # # # # # print(fr.readline())
# # # # # # print(fr.readline())
# # # # # # print(fr.readline())
# # # # # # print(fr.read())
# # # # # # for i in fr.readline():
# # # # # # 	print(i)
# # # # # # fr.close()

# # # # # # read() --> string
# # # # # # readline() --> string
# # # # # # readlines() --> list 

# # # # # # <fileobj>.readlines()

# # # # # # fr = open("demo.txt" , "r")
# # # # # # print(fr.readlines())
# # # # # # for line in fr.readlines():
# # # # # # 	print(line)
# # # # # # print(fr.readlines(7)) # 1 --> len(line)
# # # # # # print(fr.readlines(18)) # 
# # # # # # fr.close()

# # # # # # fr = open("demo.txt" , "r")
# # # # # # <fileobj>.tell()
# # # # # # print(fr.tell())
# # # # # # fr.read(11)
# # # # # # print(fr.tell())
# # # # # # fr.read()
# # # # # # print(fr.tell())
# # # # # # fr.close()

# # # # # # seek() --> ???
# # # # # # 	offset 
# # # # # # 	whence 

# # # # # # 0 start 
# # # # # # 1 current 
# # # # # # 2 end 

# # # # # # 0,10 
# # # # # # 1,20
# # # # # # 2,-5

# # # # # # tasks , modules ---> 180919

# # # # # # n = enter a number  
# # # # # # 5  
# # # # # # enter a number 
# # # # # # 3 
# # # # # # enter a number 
# # # # # # 6

# # # # # # chars.txt 

# # # # # # 5   #65 --> 65 + n 
# # # # # # a 
# # # # # # b 
# # # # # # c 
# # # # # # d
# # # # # # e 

# # # # # # 3 # ord(string[-1]) + ord(string[-1])+n
# # # # # # f  
# # # # # # g 
# # # # # # h

# # # # # # 6 # ord(string[-1]) + ord(string[-1])+n
# # # # # # i 
# # # # # # j 
# # # # # # k 
# # # # # # l 
# # # # # # m 
# # # # # # n 
# # # # # # o 

# # # # # # enter a name 
# # # # # # khan 
# # # # # # enter a password
# # # # # # Ab1@dnmjdsd 

# # # # # # enter a name 
# # # # # # john 
# # # # # # enter a password
# # # # # # eebfr
# # # # # # invalid format of password 
# # # # # # enter a password again
# # # # # # HJ72BHJBhdkj@12

# # # # # # users.txt 
# # # # # # khan 		-		12345
# # # # # # john		- 		98765

# # # # # # format() --> str function --> ???
# # # # # # def checkname(name):
# # # # # # 	users = []
# # # # # # 	fr = open("users.txt","r")
# # # # # # 	data = fr.readlines()
# # # # # # 	for i in data:
# # # # # # 		users.append((i.split("-")[0]).rstrip())
# # # # # # 	fr.close()
# # # # # # 	if name in users:
# # # # # # 		return 1 
# # # # # # 	else:
# # # # # # 		return 0 

# # # # # # def writedata():
# # # # # # 	name = input("enter the name : ")
# # # # # # 	if checkname(name) == 1:
# # # # # # 		print("user already exists.")
# # # # # # 	else:
# # # # # # 		pwd = input("enter the password : ")
# # # # # # 		fw = open("users.txt","a")
# # # # # # 		fw.write(name + "    -     "+pwd +"\n")
# # # # # # 		fw.close()

# # # # # # writedata()

# # # # # modules and packages
# # # # # 	module --> python file (.py , .pyc . ipynb)
# # # # # 3 kinds 
# # # # # 	- internal default
# # # # # 		map() , len() , print()
# # # # # 	- internal imported 
# # # # # 		reduce() , sys.argv , keyword.kwlist , sys.maxint
# # # # # 	- external 
# # # # # 		numpy , pandas , cv2 , pil , six 

# # # # # python packaging index  (PyPI)
# # # # # pip --> installed 

# # # # # pip list --> 22 --> all available external modules / packages
# # # # # pip freeze --> 20 --> all manually installed modules/ packages

# # # # # pip install <modulename>
# # # # # pip uninstall <modulename>

# # # # # 3 ways 

# # # # # complete import 
# # # # # 	import <modulename>
# # # # # import weekend
# # # # # print(weekend.a)
# # # # # print(weekend.tech)

# # # # # specific import 
# # # # # from <modulename> import <components>
# # # # # from weekend import tech 
# # # # # print(tech)

# # # # # * import 
# # # # # from  <modulename> import * 
# # # # # from weekend import * 
# # # # # print(a)
# # # # # print(tech)

# # # # package ---> collection of modules --> folder

# # # # demo  --> folder 	
# # # # 	1.py 
# # # # 	2.py 
# # # # 	3.py 
# # # # 	4.py 

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

# # # # demo  --> package 	
# # # # 	1.py 
# # # # 	2.py 
# # # # 	3.py 
# # # # 	4.py 
# # # # 	__init__.py --> empty file

# # # # import --> packages --> ???

# # # # random	

# # # import random 

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

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

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

# # # # seed --> ??

# # # # users.txt 
# # # # khan -   JFoj4326KjEu3498
# # # # john -   Jerb3746jhfb9483
# # # # jane -   ravi4938jhdb3472

# # # # enter a name 
# # # # khan 
# # # # JFoj4326KjEu3498

# # # # enter a name 
# # # # john 
# # # # Jerb3746jhfb9483

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

# # # # enter a name 
# # # # ravi 
# # # # user already exists 

# # # # os module 

# # # import os 
# # # # print(os.name) # posix / nt 
# # # # print(os.getcwd())
# # # # os.chdir("/Users/digitallync/Downloads")
# # # # print(os.getcwd())
# # # # print(os.listdir("/Users/digitallync/Desktop"))
# # # # for i in os.listdir("/Users/digitallync/Desktop"):
# # # # 	print(i)

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

# # # # removing
# # # # --------
# # # # os.rmdir("demo")
# # # # os.removedirs("dir1/dir2/dir3") # XXXX py2 XXXX
# # # # shutil ---> non empty directories 

# # # # sys paths 
# # # # os.path.

# # # # print(os.path.split("/Users/digitallync/Desktop/pys"))
# # # # print(os.path.split("/Users/digitallync/Desktop/weekend.py"))
# # # # print(os.path.split("/Users/digitallync/Desktop/abcd"))
# # # # print(os.path.split("/Users/digitallync/Desktop/abcd.py"))

# # # # print(os.path.splitext("/Users/digitallync/Desktop/pys"))
# # # # print(os.path.splitext("/Users/digitallync/Desktop/weekend.py"))
# # # # print(os.path.splitext("/Users/digitallync/Desktop/abcd"))
# # # # print(os.path.splitext("/Users/digitallync/Desktop/abcd.py"))

# # # # print(os.path.isdir("/Users/digitallync/Desktop/pys"))
# # # # print(os.path.isdir("/Users/digitallync/Desktop/abcd"))
# # # # print(os.path.isdir("/Users/digitallync/Desktop/pys/weekend.py"))
# # # # print(os.path.isdir("/Users/digitallync/Desktop/abcd.py"))

# # # # print(os.path.isfile("/Users/digitallync/Desktop/pys"))
# # # # print(os.path.isfile("/Users/digitallync/Desktop/abcd"))
# # # # print(os.path.isfile("/Users/digitallync/Desktop/pys/weekend.py"))
# # # # print(os.path.isfile("/Users/digitallync/Desktop/abcd.py"))

# # # # rename , move --> ???
# # # # enter path 
# # # # "/Users/digitallync/Desktop"

# # # # module 4 
# # # # --------
# # # # classes and objects

# # # # class ---> variables and functions
# # # # 	- attributes
# # # # object ---> data instance of class 

# # # # class <cname>: # mandatory , once 
# # # # 	<attributes>

# # # # <oname1> = <cname>() # optional , multiple
# # # # <oname2> = <cname>()
# # # # <oname3> = <cname>()
# # # # <oname4> = <cname>()

# # # # variables --->  class variables
# # # # functions --->  methods --> 3 kinds

# # # # 2 references
# # # # 	class reference    cname.
# # # # 	object reference   oname.

# # # # c++ , java --> class --> mandatory
# # # # main() --> java , c , C++

# # # # class organisation:
# # # # 	# variables -> class variables
# # # # 	org_name = "Lync"
# # # # 	org_address = "hyd"
# # # # 	org_strength = 10 

# # # # o1 = organisation()
# # # # o2 = organisation()
# # # # o3 = organisation()

# # # # print(organisation)
# # # # print(o1)
# # # # print(o2)
# # # # print(o3)

# # # # print(type(organisation))
# # # # print(type(o1))

# # # # a = 10 
# # # # type(a) --> class int 
# # # # tech = "python"
# # # # type(tech) --> class str 
# # # # type(organisation) --> class type

# # # # class organisation:
# # # # 	org_name = "Lync"
# # # # 	org_address = "hyd"
# # # # 	org_strength = 10 

# # # # 	# instance variables
# # # # 	def addnums(a,b):
# # # # 		print(a+b)

# # # # o1 = organisation()
# # # # o2 = organisation()

# # # # o1.addnums(10,20)
# # # # organisation.addnums(10,20) # class reference

# # # # print(organisation.org_name) # class reference
# # # # print(o1.org_name) # object reference
# # # # print(o2.org_name) # object reference

# # # # o1.org_name = "DL" # modify --> object reference

# # # # print(organisation.org_name) # Lync
# # # # print(o1.org_name) # DL
# # # # print(o2.org_name) # Lync

# # # # organisation.org_name = "digitallync"

# # # # print(organisation.org_name) # class reference
# # # # print(o1.org_name) # object reference
# # # # print(o2.org_name) # object reference

# # # # class variables --> class , object reference
# # # # methods --> instance variables --> object reference

# # # # class organisation:

# # # # 	org_name = "Lync"
# # # # 	org_address = "hyd"
# # # # 	org_strength = 10 

# # # # 	def hire(self,emp_name , emp_role , emp_sal):
# # # # 		# print(self)
# # # # 		print("Name of employee is " + emp_name)
# # # # 		print("Role of employee is " + emp_role)
# # # # 		print("Salary of employee is " + emp_sal)
# # # # 		organisation.org_strength = organisation.org_strength + 1

# # # # o1 = organisation()
# # # # o2 = organisation()
# # # # o3 = organisation()
# # # # o4 = organisation()

# # # # o1.hire("khan","pd","1")
# # # # o2.hire("john","d","2")
# # # # o4.hire("jane","b","20")

# # # # print(organisation.org_strength)

# # # # class organisation:
# # # # 	org_name = "Lync"
# # # # 	org_address = "hyd"
# # # # 	org_strength = 10

# # # # 	# instance method
# # # # 	def __init__(self,emp_name , emp_role , emp_sal):
# # # # 		print("Name of employee is " + emp_name)
# # # # 		print("Role of employee is " + emp_role)
# # # # 		print("Salary of employee is " + emp_sal)
# # # # 		organisation.org_strength = organisation.org_strength + 1

# # # # o1 = organisation("khan","pd","1")
# # # # o2 = organisation("john","d","2")
# # # # o3 = organisation() #XXXX
# # # # o4 = organisation()

# # # # __init__(self) --> hire 
# # # # __del__(self) --> fire

# # # # types of methods 
# # # # 	3 methods 
# # # # 		- instance methods
# # # # 		- class methods
# # # # 		- static methods

# # # # instance methods
# # # # 	- self
# # # # 	- object reference
# # # # 	- object
# # # # 	sal  ,  emp_name , hike , fire , promote 

# # # # class methods 
# # # # 	- cls 
# # # # 	- class reference
# # # # 	- object , class 
# # # #     - decorator --> @classmethod
# # # #     holiday , changeCname , 

# # # # static methods 
# # # # 	- XXX 
# # # # 	- calc(76448,12) , datetoday()
# # # # 	- decorator --> @staticmethod

# # # # self --> python ==> this ---> java 

# # # class organisation:
# # # 	org_name = "Lync"
# # # 	org_address = "hyd"
# # # 	org_strength = 10

# # # 	# instance method
# # # 	def __init__(self,emp_name , emp_role , emp_sal):
# # # 		self.emp_name = emp_name
# # # 		self.emp_sal = emp_sal	
# # # 		self.emp_role = emp_role
# # # 		organisation.org_strength = organisation.org_strength + 1

# # # 	def printer(self):
# # # 		print("Name of employee is " + self.emp_name)
# # # 		print("Role of employee is " + self.emp_role)
# # # 		print("Salary of employee is " + self.emp_sal)
# # # 		print(organisation.org_name)

# # # 	@classmethod
# # # 	def changeCname(cls,newname):
# # # 		# organisation.org_name = newname
# # # 		cls.org_name = newname
# # # 		# print("compnay name has been changed to "+organisation.org_name)
# # # 		print("compnay name has been changed to "+cls.org_name)

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

# # # o1 = organisation("khan","pd","1")
# # # o2 = organisation("john","d","2")

# # # # o1.printer()

# # # # print(organisation.org_name)
# # # # o2.printer()
# # # # organisation.changeCname("DL")
# # # # o1.printer()
# # # # print(organisation.org_name)
# # # o1.calc(2000,0.2)


# # # car 
# # # 	start 
# # # 	acc 
# # # 	brake 
# # # 	stop 
# # # 	printer

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

# # # oops
# # 	inheritance 
# # 	polymorphism
# # 	abstraction 
# # 	encapsulation 

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

# # simple inheritance
# # 	parent --> child
# # 	super --> sub

# # 	vehicle --> car 
# # 	vehicle --> bike
# # 	vehicle --> truck

# # 	employee --> manager 
# # 	employee --> developer 

# # 	bankAcc --> savings 
# # 	bankAcc --> current 
# # 	bankAcc --> corporate 
	 
# # multiple inheritance
# # 	# C++ 
# # 	# java --> multiple inheritance --> XXX classes XX 
# # 	# java --> multiple inheritance --> interfaces  
# # 	parent1(5) , parent2(4) ---> child(6)
# # 	p1 --> 5
# # 	p2 --> 4 
# # 	c1 --> 15

# # 	techEmp --> 5
# # 	mangEmp --> 3

# # 	techEmp --> developer (5)
# # 	mangEmp --> HR (3)
# # 	techEmp , mangEmp --> techmanager (8)

# # multi level 
# # 	p1 --> p2 --> p3 --> p4 --> c
# # 	dev(4) --> lead(5) --> manager(3) --> ceo(4)

# # hybrid inheritance --> ???

# # syntax 
# # ------

# # class parent1:
# # 	pass 
# # class parent2:
# # 	pass 
# # # simple
# # class child(parent1):
# # 	pass
# # #multiple
# # class child(parent1,parent2):
# # 	pass
# # # multi level
# # class parent2(parent1):
# # 	pass 
# # class child(parent2):
# # 	pass

# # vehicle1
# # 	__init__ name 
# # 	start 
# # 	acc 
# # 	brake 
# # 	stop 
# # 	printer

# # vehicle2 
# # 	__init__ make
# # 	start 
# # 	acc 
# # 	brake 
# # 	stop 
# # 	printer

# # car (vehicle1,vehicle2)
# # 	__init__ name , make
# # 		super(vehicle1).__init__ name
# # 		super(vehicle2).__init__ make
# # 	rev

# # bike (vehicle)
	
# # v1 --> 5 
# # c1 --> 6 
# # b1 --> 5 

# # c1 --> car __init__

# # super(car,vehicle1)
# # super(vehicle1,car)

# # polymorphism
# # 	- dynamic polymorphism
# # 	- static polymorphism

# # polymorphism
# # 	method overloading 
# # 		avg(10,23)
# # 		avg(10,20,30)
# # 		avg(100)
# # 		*args 
# # 	method overriding 
# # 		magic methods 
# # 		operator overloading

# # class organisation:
# # 	org_name = "Lync"
# # 	org_address = "hyd"
# # 	org_strength = 10
# # 	def __init__(self,emp_name , emp_role , emp_sal):
# # 		self.emp_name = emp_name
# # 		self.emp_sal = emp_sal	
# # 		self.emp_role = emp_role
# # 		organisation.org_strength = organisation.org_strength + 1
# # 	def printer(self):
# # 		print("Name of employee is " + self.emp_name)
# # 		print("Role of employee is " + self.emp_role)
# # 		print("Salary of employee is " + self.emp_sal)
# # 		print(organisation.org_name)

# # 	def __str__(self):
# # 		return "Name of employee is " + self.emp_name

# # 	def __repr__(self):
# # 		return "Role of employee is " + self.emp_role

# # o1 = organisation("khan","pd","1")
# # o2 = organisation("john","d","2")
# # print(o1) # print(__str__(o1))

# # __str__ --> address of o1 --> print 
# # __str__ --> details of o1 --> print 

# # operator overloading

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

# # 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) # __add__(10,20) --> -10
# # print(dir(int))

# # abstraction

# # atm -> 10k -> hotel -> 1k -> bill 1k 
# # atm -> 10k -> machine -> 1k -> 10k 1k 9k 

# # public 
# # 	access
# # 	in 
# # 	out 
# # 	XX special syntax XX 
# # 	a = 10
# # protected
# # 	access	
# # 	in 
# # 	out 
# # 	special syntax
# # 	_b = 20 
# # private
# # 	access
# # 	in 
# # 	XX out XX 
# # 	special syntax 
# # 	__c = 30 

# class variables:
# 	a = 10 
# 	_b = 20 
# 	__c = 30

# 	# print(a)
# 	# print(_b)
# 	# print(__c)

# v = variables()
# # print(v.a)
# # print(v._b)
# # print(v.__c) # XXX
# # <objectname>._<classname>__<variable>
# print(v._variables__c)

# public private protected methods --> ???

# # encapsulation
# # 	- binding
# # 	acc brake start printer -> car 
# # 	30 20 30 --> c1

# # exception handling 
# # ------------------
# # 	exception

# Exception 
# 	NameError
# 	ValueError 
# 	TypeError
# 	.
# 	.

# 3 kinds 

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

# syntax
# ------

# try:
# 	<code>
# except <errorname>:
# 	print(<dialouge>)

# try:
# 	<code> (5)
# except <errorname1>:
# 	print(<dialouge1>)
# except <errorname2>:
# 	print(<dialouge2>)
# except <errorname3>:
# 	print(<dialouge3>)


# try:
# 	<code> (5)
# except Exception as e :
# 	print(e)

# try:
# 	<code> (5)
# except <errorname1>:
# 	print(<dialouge1>)
# except <errorname2>:
# 	print(<dialouge2>)
# except <errorname3>:
# 	print(<dialouge3>)
# except Exception as e :
# 	print(e)

# try:
# 	def addnums(a,b):
# 		res = a+b 
# 		print(res)
# 		# print(ans)
# 	a = input("enter only numbers :")
# 	b = input("enter only numbers :")
# 	addnums(a,b)
# 	addnums("python",100)
# 	# addnums(10,20)
# 	# addnums("python","mysql")
	
# except TypeError:
# 	print("pass only numbers")
# 	a = input("enter only numbers :")
# 	b = input("enter only numbers :")
# 	addnums(a,b)
# except NameError:
# 	print("undefined variable in the code")


# try:
# 	def addnums(a,b):
# 		res = a+b 
# 		print(res)
# 	addnums("abc",10)

# except Exception as e:
# 	print(e)

# try --> 100 lines 
# 	30 open file 
# 	80 close file 
# error --> 51 line --> except
# finally 
# 	file close


# 1 -> 50 except finally


# try --> 100 lines 
# 	30 open file 
# 	80 close file 

# finally 
# 	file close
# 1--> 100 finally

# try:
# 	def addnums(a,b):
# 		res = a+b 
# 		print(res)
# 	addnums("abc",10)

# except Exception as e:
# 	print(e)
# finally:
# 	print("lync")

# user defined exception --> video

# git -->2 
# databases --> 3 

# git --> vcs -> manage source code 
# 	- git libs 
# 	- git bash 
# 	- git GUI 

# folders , files 

folder 
	- folders 
	- files 

folders --> repositories 

folder --> initialise --> staging area --> repository 

repository structure 
	
	folder ( wd ) --> staging --> repository (LR)

folder --> videos
gitrepo-> Git repository in /Users/digitallync/Desktop/videos/.git/


files --> wd  (red)
			--> staging area (green)
								--> LR 

git init 
git add <filename> / git add . 
git commit -m "<message>"

git status

l1 
l2 				rr
l3 

rr --> server , 3rd party 
github , bitbucket

https://github.com/junaid238/videos_khan.git

LR <---> RR 
git remote add origin https://github.com/junaid238/videos_khan.git
git remote add origin RR 

git push origin master 


tasks --> repo 
	--
	--
	--
	--

github --> rr 

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

databases
	structured databases
	unstructured databases

code --> queries
code language --> query language

structured databases --> SQL 
unstructured databases --> NoSQL

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

mysql 
	- structured database
	- libs , shell 
	- 8 

4 components
	- host     --> localhost
	- port 	   --> 3306 
	- user 	   --> root
	- password --> **** 

databases --> CRUD operations 

cmd / shell 	

c:/>mysql -u root -p 
Enter password:
***** 

mysql>show databases;
sys 
info_schema
perf_schema
mysql 

mysql>create database school;

mysql>show databases;
sys 
info_schema
perf_schema
mysql 
school 

mysql>drop database school;

mysql>show databases;
sys 
info_schema
perf_schema
mysql 

mysql>create database school;
mysql>create database college;
mysql>create database company;
mysql>create database university;

# SQL
# 	databases
# 		tables 
# 			cols 
# rows --> data 

# students --> table 
mysql>use school;
mysql>create table students(
	rno int(32) ,
	name varchar(64),
	standard varchar(64),
	section char,
	fee_status int(32));
mysql>show tables;
students
mysql>use college;
mysql>show tables;
empty
mysql>use school;


# students --> table name 
# col names		col dtypes
# 	rno 		int 
# 	name 		varchar
# 	standard 	varchar
# 	section 	char 
# 	fee_status	int 

# mysql 
# 	school
# 		students
# 			rno , name , standard , section , fee_status

# DLL DML 
# insert query --> insert data in tables
# mysql>insert into students values (1,khan,10,a,0);
# mysql>insert into students values (2,abcd,9,d,1);
# mysql>insert into students values (3,qwer,6,c,1);

# select query --> get data from tables
# mysql>select name from students;
# khan 
# abcd 
# qwer 

# mysql>select name,fee_status from students;
# khan 0 
# abcd 1 
# qwer 1 

# mysql>select * from students;
# 1 khan 10 a 0  
# 2 abcd  9 d 1 
# 3 qwer  6 c 1 

students
	rno,name,mobile,standard,section,fee_status
			rno,name,standard,section,fee_status -> mandatory
			mobile --> optional

mysql>create table students(
	rno int(32) not null auto_increment,
	name varchar(64) not null,
	mobile varchar(15) unique, 
	standard varchar(64)not null,
	section char not null,
	fee_status int(32) not null,
	rno primary key);

# int --> sequential --> auto_increment --> 1 2 3 ... (+1)

mysql>insert into students values (NULL,khan,10,a,0);

XXX primary key --> mobile XXX 
auto_increment --> mandatory --> primary key 

python --> mysql

mysql --> queries 
	creation 
	insert 
	select 

python --> connection --> mysql 
connection
	connector --> external modules
		PyMySQL 
		mysql-connect 
		MySqlDB

pip install PyMySQL

python
mysql 
PyMySQL

pythonMysql.py

import PyMySQL
# connection object 
conn = PyMySQL.connect("localhost","khan","12345","school")
if conn :
	print("db connected successfully")
	# cursor object 
	cur = conn.cursor()
	createQuery = '''create table if not exists students(
	# rno int(32) ,
	# name varchar(64),
	# standard varchar(64),
	# section char,
	# fee_status int(32));'''
	# # execution
	cur.execute(createQuery)
	insertQuery = 'insert into students values (NULL,khan,10,a,0);'
	cur.execute(insertQuery) # execute
	conn.commit() # data
else:
	print("connection failure")

select --> ??
	one record 
	multiple records
	all records 

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

enter a user name 
khan 
4328brUI3832hhre

users 
 	username  pwd 
	khan      4328brUI3832hhre


overview of django + poc 
