您好,欢迎访问一九零五行业门户网

python中怎么查看内置函数

内置函数,一般都是因为使用频率比较频繁或是是元操作,所以通过内置函数的形式提供出来,通过对python的内置函数分类分析可以看出来:基本的数据操作基本都是一些数学运算(当然除了加减乘除)、逻辑操作、集合操作、基本io操作,然后就是对于语言自身的反射操作,还有就是字符串操作,也是比较常用的,尤其需要注意的是反射操作。
python解释器内置了很多函数和类型,您可以在任何时候使用它们。以下按字母表顺序列出它们。
经常调用的时候不知道python当前版本的内置函数是哪些,可以用下面的指令查看:
相关推荐:《python视频教程》
c:\users\administrator>pythonpython 2.7.11 (v2.7.11:6d1b6a68f775, dec 5 2015, 20:32:19) [msc v.1500 32 bit (intel)] on win32type "help", "copyright", "credits" or "license" for more information.>>> import sys>>> dir(sys.modules['__builtin__'])['arithmeticerror', 'assertionerror', 'attributeerror', 'baseexception', 'buffererror', 'byteswarning', 'deprecationwarning', 'eoferror', 'ellipsis', 'environmenterror', 'exception', 'false', 'floatingpointerror', 'futurewarning', 'generatorexit', 'ioerror', 'importerror', 'importwarning', 'indentationerror', 'indexerror', 'keyerror', 'keyboardinterrupt', 'lookuperror', 'memoryerror', 'nameerror','none', 'notimplemented', 'notimplementederror', 'oserror', 'overflowerror', 'pendingdeprecationwarning', 'referenceerror', 'runtimeerror', 'runtimewarning', 'standarderror', 'stopiteration', 'syntaxerror', 'syntaxwarning', 'systemerror','systemexit', 'taberror', 'true', 'typeerror', 'unboundlocalerror', 'unicodedecodeerror', 'unicodeencodeerror', 'unicodeerror', 'unicodetranslateerror', 'unicodewarning', 'userwarning', 'valueerror', 'warning', 'windowserror', 'zerodivisionerror', '__debug__', '__doc__', '__import__', '__name__', '__package__', 'abs','all', 'any', 'apply', 'basestring', 'bin', 'bool', 'buffer', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod', 'cmp', 'coerce', 'compile', 'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', 'exit', 'file', 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'intern', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'long', 'map', 'max', 'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property', 'quit', 'range', 'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', 'vars', 'xrange', 'zip']
以上就是python中怎么查看内置函数的详细内容。
其它类似信息

推荐信息