abs() 函數(shù)
輸出結(jié)果為:1 和 100.1
Python dict() 函數(shù)
Python help() 函數(shù)
help('str')
Python min() 函數(shù)
print('min(1,5,33,3,1,56,67,2)',min(1,5,33,3,1,56,67,2))
輸出結(jié)果為:min(1,5,33,3,1,56,67,2)========>1
Python setattr() 函數(shù)
輸出結(jié)果為1 和 5
Python?all() 函數(shù)
輸出的結(jié)果為:True,False,False
Python dir() 函數(shù)
a=dir([object])
print(a)
輸出結(jié)果為:
['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']
Python hex() 函數(shù)
a=hex(255)
print(a)
輸出結(jié)果為:? ? 0xff
Python next() 函數(shù)
輸出結(jié)果為:1,2,3,4,5
Python slice() 函數(shù)
輸出的結(jié)果為:? ? [0, 1, 2, 3, 4]
Python?any() 函數(shù)
a =any(['a','b','c','d'])
print(a)
######################
b =any([1,2,3,4,5,0])
print(b)
######################
c =any([0,False,0])
print(c)
輸出結(jié)果為:True,True,False
Python divmod() 函數(shù)
輸出的結(jié)果為:(3, 1),(4, 0)