1, ABS () to seek absolute value
2, all () parameter is true, returns true, otherwise false
3, any () parameter exists any one is true, then returns True, all false to return false
4. Bin () converts the parameter to binary representation 0b
5. Oct () Converts the parameter to the corresponding octal representation of 0o
6. Hex () Converts the parameter to the corresponding hexadecimal representation of 0x
7, Bytes () Convert parameter to byte type
Bytes (The string to convert, according to what code)
8, callable () whether can be called judgment
9. chr () | Conversion of Ord () ASCII code correspondence relation
R = chr (+) print (r) w = Ord (' A ') print (W) a 97 generate random Captcha instance: import random mm = [] for I in range (6): R = Random.randran GE (0,5) if r = = 2 or r = = 3:num = Random.randrange (0,10) mm.append (str (num)) else:temp = RA Ndom.randrange (65,91) # #65-90 corresponds to capital letter segment C = chr (temp) mm.append (c) res = "". Join (mm) print (res)
This article is from the "LE" blog, please be sure to keep this source http://lz001.blog.51cto.com/8294567/1795383
Python Learning-function Supplement 2-built-in functions