当前位置: 首页 > news >正文

遵义县公司网站建设/友情链接购买

遵义县公司网站建设,友情链接购买,复古传奇网页版游戏,营销型网站建设网站手机本文主要内容摘自我在百度百科的账号number1killer的词条贡献, Python查看 2017-08-18 11:48未被修改 1. 列出模块中的函数标注     用import导出模块后,可使用函数dir(m)列出模块的所有函数,import是导出模块的命令,m是模块…

本文主要内容摘自我在百度百科的账号number1killer的词条贡献,
Python查看 2017-08-18 11:48未被修改

1. 列出模块中的函数标注  
  用import导出模块后,可使用函数dir(m)列出模块的所有函数,import是导出模块的命令,m是模块名。
  例子:

标注
>>>import math    
>>>dir(math)
['__doc__', '__loader__', '__name__', '__package__', '__spec__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'inf', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'log2', 'modf', 'nan', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'tau', 'trunc']

标注

  这个例子列出math模块的一些函数,以双下划线( _ _ )开头的名称用于较复杂的python编程。

2.查看完整的python内置函数清单
标注
查看完整的python内置函数清单,可在提示符后输入 >>>dir(_ _builtins_ _)。
例子:





>>> dir(__builtins__)

['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'BlockingIOError', 'BrokenPipeError', 'BufferError', 'BytesWarning', 'ChildProcessError', 'ConnectionAbortedError', 'ConnectionError', 'ConnectionRefusedError', 'ConnectionResetError', 'DeprecationWarning', 'EOFError', 'Ellipsis', 'EnvironmentError', 'Exception', 'False', 'FileExistsError', 'FileNotFoundError', 'FloatingPointError', 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError', 'ImportWarning', 'IndentationError', 'IndexError', 'InterruptedError', 'IsADirectoryError', 'KeyError', 'KeyboardInterrupt', 'LookupError', 'MemoryError', 'ModuleNotFoundError', 'NameError', 'None', 'NotADirectoryError', 'NotImplemented', 'NotImplementedError', 'OSError', 'OverflowError', 'PendingDeprecationWarning', 'PermissionError', 'ProcessLookupError', 'RecursionError', 'ReferenceError', 'ResourceWarning', 'RuntimeError', 'RuntimeWarning', 'StopAsyncIteration', 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError', 'TimeoutError', 'True', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', 'UnicodeWarning', 'UserWarning', 'ValueError', 'Warning', 'WindowsError', 'ZeroDivisionError', '_', '__build_class__', '__debug__', '__doc__', '__import__', '__loader__', '__name__', '__package__', '__spec__', 'abs', 'all', 'any', 'ascii', 'bin', 'bool', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod', 'compile', 'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit', 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'map', 'max', 'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property', 'quit', 'range', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'vars', 'zip']
3. 查看某个函数的文档帮助信息
标注
可以用函数help(函数)来查看某个函数的文档帮助信息。
  例子:


>>>help(sum)Help on built-in function sum in module builtins:sum(iterable, start=0, /)   
      
    Return the sum of a 'start' value (default: 0) plus an iterable of numbers      When the iterable is empty, return the start value.    
      
    This function is intended specifically for use with numeric values and may    reject non-numeric types.
标注
可以直接在提示符下输入help(),然后输入某个模块或函数名得到详细的帮助信息。
 





 

http://www.jmfq.cn/news/4920031.html

相关文章:

  • 如何把网站放在主机上/今日国际军事新闻
  • 男人和女人做羞羞的免费网站/电子商务平台有哪些
  • 南通做网站的花云/浙江网站建设营销
  • 长安网站建设详细教程/软文营销的定义
  • 黑客网站免费盗号/找seo外包公司需要注意什么
  • 自己电脑做网站好吗/黄页88网官网
  • 网站如何测试/小学生收集的新闻10条
  • 学校网站制作方案/seo研究中心怎么了
  • 17网站一起做网店类似的/安康地seo
  • 西宁高端网站建设/电商培训机构靠谱吗
  • 响应式网站 谷歌 移动网站/体验营销案例分析
  • 购物网站优惠券怎么做/简述seo对各类网站的作用
  • 做网站语言学什么/第三方网站流量统计
  • 做与食品安全有关的网站/济南seo优化公司
  • 盱眙有做网站开发的吗/我想学做互联网怎么入手
  • 手机cms建站系统/青岛做网络推广的公司有哪些
  • wordpress苏醒主题破解/seo具体是什么
  • 网站建设全过程/磁力猫torrentkitty官网
  • 政府门户网站建设情况/效果好的东莞品牌网站建设
  • 宿州网站建设时间/厦门seo怎么做
  • 呼和浩特建设工程安全管理网站/网络推广策划案
  • 公司网站封面怎么做/惠州seo招聘
  • 招商门户网站建设方案/怎么做app推广代理
  • 济南专业做网站公司/网站排名优化的技巧
  • 网站建设营业执照如何写/苏州网站建设开发公司
  • 外贸企业做网站/好的营销网站
  • 做网站要学哪些程序/关键词排名查询官网
  • 涂料网站建设/九江seo
  • 作文网址/网站怎样优化文章关键词
  • 网站首页下拉广告/企业站seo案例分析