>>>help(math.sin)Help on built-in function sin in module math:sin(...)sin(x) Return the sine of x (measured in radians).>>>
查看函数信息的另一种方法print(funcname._doc)
如查看内建函数print用法
>>>print(print.__doc__)print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)Prints the values to a stream,or to sys.stdout by default....>>>
import pipinstalled_packages = pip.get_installed_distributions()installed_packages_list =sorted(["%s==%s"% (i.key, i.version)for i in installed_packages])print(installed_packages_list)