print('date: 19_9') #19_9
import math
def a():
x=1
y=2
z=3
print(y)
return True
a()
print(a())
print(a, a())
import math
#x=math.Sqrt(4)
#print(x)
x=a() + a()
print(x)
def a(): # 1)regist a
y = 1 # 2)regist y
def b(): #3)regist b
print('I am from function b', y) # 4)run print
return b #5) return b location to content on a()
x =a()
print(x(), x) #x() = b()
def a(): # 1)regist a
y = 1 # 2)regist y
def b(): #3)regist b
print('I am from function b()') # 4)run print
return b() #5) return b content on a()
x =a()
print(x)
def a(): # 1)regist a
y = [1,2,3]
z = 1,6,3 # 2)regist y
def b(): #3)regist b
print('I am from function b()', y) # 4)run print
return b
return y,z,b() #5) return b content on a()
x =a()
print(x, id(x))
#print(x[2](), x[1])
def a(): # 1)regist a
y = [1,2,3]
z = 4,5,7 # 2)regist y
return y,z,b #5) return b content on a()
def b(): #3)regist b
print('I am from function b()') # 4)run print
return b
x =a()
print(x, id(x))
print(x[2](), x[1][1])
def a(x):
y=x
return math.sqrt(y)
b= int (a(16))
print(b)
def a(w):
y=w
z=1,2,3
def b():
print('I am from function b()')
return None
return y,z,b #5) return b content on a()
x =a([4,2,[3]])
print(x[0], id(x))
def a(w):
return w()
def b():
print('I am from function b')
def c():
print('i am from function c')
a(c)
print('date : 12_9')
body={'x':0.3,"Y":1,"Z":0.7} # dict 12_9
print(body, body["x"] , body.items())
body["b"]='s'
cs = body
cs.update( {'a':0} )
body['x']=1
print(cs.items())
#cs.shift('a')
print(cs)
'''
print('date: 5_9') #5_9
b=[1,2,3]
b.append(4)
print(b)
b=[1,[2,4,(5,6)],3,{"food":"apple", "toy":"bear", "font":['a', 'b', 'c']}]
print(b[3]["toy"]) #find bear
print(b[3]["font"][1]) #find 'b'
print (b[1][2][1] )#find 6
print (b[1][2][1], type(b), type(b[3]["toy"]) , type(b[1][2]), type(b[1][2][1]))#find 6,
a= tuple()
print(type(a))
a={1,2,2,3,4,4,5,6,2,3,'b'}
print(a)
print(int(5/3), 5//3, 5.999//3, type(5.222//3), 5%3, 7%3)
print(-2/3,'-z-', -7/3,'-z-', -7//3,'-x-', -7%3, '-x-',7%3)
print(2**3) #2^3
print('')
i = 0 #12_9
i= i +1
def a():
y=+1
print("I am form function a", i, y)
return b
def b():
# i=i+1
print("I am form function b")
return a
a()()()()()
print (a(), a()())
x= [1,[2,4],3] #list
print (x , id(x), x[1][1])
print('------')
x[0] =x[1]
print(x , id(x))
x[0] =x[0] +x[1]
print(x)
del x[2]
print (x, id(x))
del x[1][1]
print('x', x)
del x[1]
print(x)
y=[[1], [2], [3]]
z=[1,2,3]
y[0]=y[0] +y[1]
print (y, id(y), z)
y=y+x
print(y, id(y))
print('______')
z=1,2
u=3,4
print(z[0], id(z), z)
z = z + u
print(id(u), u, id(z), z)
def a():
print("a")
def b():
print('b')
v= a,b
a=10
# x[0]()
print (v)
'''
from fractions import Fraction
#example float number
float_num = 0.755
#convert float to fraction
fraction = Fraction(float_num).limit_denominator()
fraction1 = Fraction(float_num)
print(fraction, fraction1, id(fraction), id(fraction1))
v=(True)
_v="c" #internal use
__v='尸木日' #use for class
__v__ = 'ca' #dundan for python system internal use
# this is comment
print (id(1), id(True))
x=1/3
print (id(x), x )
x=1/3+ 1/3+ 1/3
print(id(x), x, (x), id(v), v)
x=0.1 +0.1 +0.1
print(id(x), x, (x), id(v), v)
耿景瘁
fsdhfkjhag
fasjk
v="sey"
print(id(v), v , id("sey"))
x = 0x01 #hex
print(id(x), x, id(1))
y=3
print(id(y), y, id(3))
z=1 + 2
print(id(z), z, id(5))
print(id(1.0), id(1.01), id(0.01))
u=(1,2,33)
print(id(u), u, id(1), id(2), id(33))
'''