#!/usr/bin/env python#-*-coding:utf-8-*-print ABS (123) #abs (number), take the absolute print all ([True,true]) #all (iterable), The loop iterates over the parameters, and if each element is true, then the return value of all is true print all ([false,true]) print any ([round-robin, ']) #any (iterable), the loop can iterate over the parameters, as long as one element is true, Then the return value of any is true print bin (4) #bin (number), converted to binary print hex (4) #hex (number), converted to hexadecimal print Oct (4) #oct (number), converted to octal print BOOL () #bool (self,x), judged true or FALSE, converts an object to a Boolean value: False for Boolean: 0 None ' (empty string) [] (Empty list) (empty tuple) {} (empty dictionary) print callable (111) #callable (object), verifies that an object can be executed by the print Divmod (10,3) #divmod (x, y), x divided by 3 returns Ganso (3,1) print range (1,100) print type (xrange (100))
#!/usr/bin/env python#-*-coding:utf-8-*-#lambda表达式: shorthand for simple functions F2 = lambda x,y,z:x*y*z #f2 = lambda form parameter: function expression, where F2 is a function , you need to call the pass parameter to use print F2
#!/usr/bin/env python#-*-coding:utf-8-*-#isinstance (): Judging object Type temp = ' 123 ' Print isinstance (TEMP,STR) #temp: Objects instantiated through the Str class
"Python" Lalal