s= "6*8"
A=eval (s)
print (a)
#filter与map
a=[10,20,30,40]
New_list=map (lambda x:x+10,a)
b=list (new_list)
print (b)
def x (b):
c=b+10
return C
C=map (x,a)
d=list (c)
print (d)
def bb (x):
if (x>=30):
return True
Else:
return False
C=filter (bb,a)
Print (list (c))
#frozenset Freeze Set set indicates that the set collection can only be queried and cannot be modified
Print (Globals ()) # Get all the global variables
print (Locals ()) #得到所有的局部变量
#hash used primarily for keys in a dictionary,
#hex (10) Get the corresponding 16 binary
#id () Get the address of this object
a=[1,2,3,4]
For B in Iter (a):
print (b)
B=max (1,3,2,10,32)
# print (b)
a=oct (8) #得到8进制
print (a)
B=pow (2,3)
print (b)
a=[1,2,3,45,51]
For i in range (0,5):
print (A[i])
Print (range (0,5)) #python2是直接输出0, 1,2,3,4,. The Python3 is optimized. Return a value only when data is needed
#repr calls itself the __repr__ () method
c=[1,2,3,4,5]
d=reversed (c)
Print (list (d))
B=round (4.6)
print (b)
b=sum ([3,4,5,6])
print (b)
#super like there's a parent class that has a method a ()
#你想调用A父类的A方法, you can use Super (). A ()
print (VARs ())
a=[1,2,3]
b=[4,5,6]
c=[7,8,9]
d=zip (a,b,c)
Print (list (d))
Python built-in function two