Python built-in function
ABS () to find the absolute value.
Number less than 0, which becomes greater than 0.
# Print (ABS ( -1)) # Print (ABS (0))
All () returns the result to true as long as the iterator object is empty.
When an iteration object is not empty, all objects do a Boolean operation, all true, or false.
# Print (All (")) # Print (All ((1, ', 2,none))) # Print (All (i-I in range (1,10)))
SUM () Sum function
# Res=sum (I for I in range (3)) # Print (res)
Returns False if any () can iterate the object to null.
True if the Boolean value of any one of the results in an object can be iterated.
# print (any ([]) ) # print (Any ([none,0, ', {},1]))
ASCII ()
Bin () turns a number into binary.
# Print (Bin (3))
BOOL () determines the Boolean value.
# Print (bool (0)) # Print (bool (None)) # Print (BOOL ("))
Bytes () turns the string into a byte-shaped shape.
# Print (bytes (' Hello ', encoding= ' Utf-8 '))
Whether callable () can be called. Returns a Boolean value.
# def Test (): # pass# print (callable (test))# print (callable (sum) )
Chr () is the conversion relationship of ASCII code, the corresponding position character of the ASCII code table corresponding to the number
# print (Chr ) # print (Chr )
Ord () is the ASCII code conversion relation character corresponding to the corresponding position number of the ASCII code table
# Print (Ord (' A '))
Data type:
#Data Type#int#num=1 #num =int (1)#print (Type (num)) #查看num的类型#Print (Isinstance (num,int)) #判断num是否为int类型#print (num is 1) #is an identity operation, based on the ID to determine the identity#float#BOOL#Complex#Str#x= ' Asdfa ' #x =str (' Asdfa ')#Print (str (1))#Print (str ({' A ': 1}))#List#x=[]#X=list (I for I in range )#print (x)#tuple#Dict#d={' a ': 1}#d=dict (x=1,y=2,z=3)#print (d)Set#s={1,2,3,4,4}#print (s)#S.add (5)#print (s)##Frozenset #不可变集合#f=frozenset ({1,2,3,4})#print (Type (f))#X=complex (1-2j)#print (x.real)#print (X.IMAG)#x=1-2j#print (x.real)#print (X.IMAG)
Python built-in function