数字的常用方法:

>>> dir(int)

[‘__abs__‘, ‘__add__‘, ‘__and__‘, ‘__bool__‘, ‘__ceil__‘, ‘__class__‘, ‘__delattr__‘, ‘__dir__‘, ‘__divmod__‘, ‘__doc__‘, ‘__eq__‘, ‘__float__‘, ‘__floor__‘, ‘__floordiv__‘, ‘__format__‘, ‘__ge__‘, ‘__getattribute__‘, ‘__getnewargs__‘, ‘__gt__‘, ‘__hash__‘, ‘__index__‘, ‘__init__‘, ‘__init_subclass__‘, ‘__int__‘, ‘__invert__‘, ‘__le__‘, ‘__lshift__‘, ‘__lt__‘, ‘__mod__‘, ‘__mul__‘, ‘__ne__‘, ‘__neg__‘, ‘__new__‘, ‘__or__‘, ‘__pos__‘, ‘__pow__‘, ‘__radd__‘, ‘__rand__‘, ‘__rdivmod__‘, ‘__reduce__‘, ‘__reduce_ex__‘, ‘__repr__‘, ‘__rfloordiv__‘, ‘__rlshift__‘, ‘__rmod__‘, ‘__rmul__‘, ‘__ror__‘, ‘__round__‘, ‘__rpow__‘, ‘__rrshift__‘, ‘__rshift__‘, ‘__rsub__‘, ‘__rtruediv__‘, ‘__rxor__‘, ‘__setattr__‘, ‘__sizeof__‘, ‘__str__‘, ‘__sub__‘, ‘__subclasshook__‘, ‘__truediv__‘, ‘__trunc__‘, ‘__xor__‘, ‘bit_length‘, ‘conjugate‘, ‘denominator‘, ‘from_bytes‘, ‘imag‘, ‘numerator‘, ‘real‘, ‘to_bytes‘]

第一组常用方法:

‘bit_length‘, ‘conjugate‘, ‘denominator‘, ‘from_bytes‘, ‘imag‘, ‘numerator‘, ‘real‘, ‘to_bytes‘

第二组常用方法:

(内置函数)

math模块的方法:

>>> 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‘, ‘remainder‘, ‘sin‘, ‘sinh‘, ‘sqrt‘, ‘tan‘, ‘tanh‘, ‘tau‘, ‘trunc‘]

第三组常用方法:

‘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‘, ‘remainder‘, ‘sin‘, ‘sinh‘, ‘sqrt‘, ‘tan‘, ‘tanh‘, ‘tau‘, ‘trunc‘

字符串的常用方法:

>>> dir(str)

[‘__add__‘, ‘__class__‘, ‘__contains__‘, ‘__delattr__‘, ‘__dir__‘, ‘__doc__‘, ‘__eq__‘, ‘__format__‘, ‘__ge__‘, ‘__getattribute__‘, ‘__getitem__‘, ‘__getnewargs__‘, ‘__gt__‘, ‘__hash__‘, ‘__init__‘, ‘__init_subclass__‘, ‘__iter__‘, ‘__le__‘, ‘__len__‘, ‘__lt__‘, ‘__mod__‘, ‘__mul__‘, ‘__ne__‘, ‘__new__‘, ‘__reduce__‘, ‘__reduce_ex__‘, ‘__repr__‘, ‘__rmod__‘, ‘__rmul__‘, ‘__setattr__‘, ‘__sizeof__‘, ‘__str__‘, ‘__subclasshook__‘, ‘capitalize‘, ‘casefold‘, ‘center‘, ‘count‘, ‘encode‘, ‘endswith‘, ‘expandtabs‘, ‘find‘, ‘format‘, ‘format_map‘, ‘index‘, ‘isalnum‘, ‘isalpha‘, ‘isascii‘, ‘isdecimal‘, ‘isdigit‘, ‘isidentifier‘, ‘islower‘, ‘isnumeric‘, ‘isprintable‘, ‘isspace‘, ‘istitle‘, ‘isupper‘, ‘join‘, ‘ljust‘, ‘lower‘, ‘lstrip‘, ‘maketrans‘, ‘partition‘, ‘replace‘, ‘rfind‘, ‘rindex‘, ‘rjust‘, ‘rpartition‘, ‘rsplit‘, ‘rstrip‘, ‘split‘, ‘splitlines‘, ‘startswith‘, ‘strip‘, ‘swapcase‘, ‘title‘, ‘translate‘, ‘upper‘, ‘zfill‘]

第一组常用方法:

‘capitalize‘, ‘casefold‘, ‘center‘, ‘count‘, ‘encode‘, ‘endswith‘, ‘expandtabs‘, ‘find‘, ‘format‘, ‘format_map‘, ‘index‘, ‘isalnum‘, ‘isalpha‘, ‘isascii‘, ‘isdecimal‘, ‘isdigit‘, ‘isidentifier‘, ‘islower‘, ‘isnumeric‘, ‘isprintable‘, ‘isspace‘, ‘istitle‘, ‘isupper‘, ‘join‘, ‘ljust‘, ‘lower‘, ‘lstrip‘, ‘maketrans‘, ‘partition‘, ‘replace‘, ‘rfind‘, ‘rindex‘, ‘rjust‘, ‘rpartition‘, ‘rsplit‘, ‘rstrip‘, ‘split‘, ‘splitlines‘, ‘startswith‘, ‘strip‘, ‘swapcase‘, ‘title‘, ‘translate‘, ‘upper‘, ‘zfill‘

string模块的方法:

>>> import string

>>> dir(string)

[‘Formatter‘, ‘Template‘, ‘_ChainMap‘, ‘_TemplateMetaclass‘, ‘__all__‘, ‘__builtins__‘, ‘__cached__‘, ‘__doc__‘, ‘__file__‘, ‘__loader__‘, ‘__name__‘, ‘__package__‘, ‘__spec__‘, ‘_re‘, ‘_string‘, ‘ascii_letters‘, ‘ascii_lowercase‘, ‘ascii_uppercase‘, ‘capwords‘, ‘digits‘, ‘hexdigits‘, ‘octdigits‘, ‘printable‘, ‘punctuation‘, ‘whitespace‘]

第二组常用方法:

‘ascii_letters‘, ‘ascii_lowercase‘, ‘ascii_uppercase‘, ‘capwords‘, ‘digits‘, ‘hexdigits‘, ‘octdigits‘, ‘printable‘, ‘punctuation‘, ‘whitespace‘

str.join()

>>> l

[1, 3, 4, 5] >>> "#".join(str(n) for n in l) ‘1#3#4#5‘

列表的常用方法:

>>> dir(list)

[‘__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‘]

第一组常用方法:

‘append‘, ‘clear‘, ‘copy‘, ‘count‘, ‘extend‘, ‘index‘, ‘insert‘, ‘pop‘, ‘remove‘, ‘reverse‘, ‘sort‘

元组的常用方法:

>>> dir(tuple)

[‘__add__‘, ‘__class__‘, ‘__contains__‘, ‘__delattr__‘, ‘__dir__‘, ‘__doc__‘, ‘__eq__‘, ‘__format__‘, ‘__ge__‘, ‘__getattribute__‘, ‘__getitem__‘, ‘__getnewargs__‘, ‘__gt__‘, ‘__hash__‘, ‘__init__‘, ‘__init_subclass__‘, ‘__iter__‘, ‘__le__‘, ‘__len__‘, ‘__lt__‘, ‘__mul__‘, ‘__ne__‘, ‘__new__‘, ‘__reduce__‘, ‘__reduce_ex__‘, ‘__repr__‘, ‘__rmul__‘, ‘__setattr__‘, ‘__sizeof__‘, ‘__str__‘, ‘__subclasshook__‘, ‘count‘, ‘index‘]

第一组常用方法:

‘count‘, ‘index‘

python内置对象是什么_#【Python】【基础知识】【内置对象常用方法】相关推荐

  1. 计算机术语中CPU是指______,试题题库_计算机基础知识考试试卷全套.doc

    试题题库_计算机基础知识考试试卷全套.doc 第一部分 计算机基础知识 (一)单项选择题 1. 世界上第一台计算机使用的物理器件是( ). A)电子管 B)继电器 C)晶体管 D)集成电路 2. 第四 ...

  2. 计算机专业高级知识,高级选择_电脑基础知识_IT计算机_专业资料

    高级选择_电脑基础知识_IT计算机_专业资料 (79页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦! 21.9 积分 1.注水泥塞丿施T时,从配水泥浆到反洗 ...

  3. dell电脑计算机专业,戴尔Dell专用英语_电脑基础知识_IT计算机_专业资料.doc

    戴尔Dell专用英语_电脑基础知识_IT计算机_专业资料 英文縮寫英文全名中文字義5COne methodology of solving problem, 5C including: Charact ...

  4. 计算机word文档无法工作,word无法打开(WORD文档打不开_解决方法_电脑基础知识_IT/计算机_专业资料)...

    word无法打开(WORD文档打不开_解决方法_电脑基础知识_IT/计算机_专业资料),哪吒游戏网给大家带来详细的word无法打开(WORD文档打不开_解决方法_电脑基础知识_IT/计算机_专业资料) ...

  5. excel宏计算机,excel宏教程_电脑基础知识_IT计算机_专业资料.doc

    excel宏教程_电脑基础知识_IT计算机_专业资料 Excel宏教程 一.?? 选中单个单元格 Range("").Select ? 例:Range("C9" ...

  6. 计算机PPT教材教法,小语教材教法讲义课件_电脑基础知识_it计算机_专业资料.ppt...

    小语教材教法讲义课件_电脑基础知识_it计算机_专业资料 绪 论 课堂观察的内涵 课堂观察,顾名思义,就是通过观察者对课 堂的运行状况进行记录.分析和研究,并在此基 础上谋求师范生课堂学习的改善.促进 ...

  7. 计算机机场基础知识,全国机场频率_电脑基础知识_IT计算机_专业资料

    全国机场频率_电脑基础知识_IT计算机_专业资料 (13页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦! 14.9 积分 机场频率2009-11-28 15 ...

  8. 联想计算机usb启动怎么办,联想电脑bios怎么设置USB启动_电脑基础知识_IT计算机_专业资料...

    联想电脑bios怎么设置USB启动_电脑基础知识_IT计算机_专业资料 (4页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦! 9.9 积分 联想电脑bios ...

  9. 化学相关计算机知识,化学练习_电脑基础知识_it计算机_专业资料.ppt

    化学练习_电脑基础知识_it计算机_专业资料 七年级上册第二单元:认识新自我 第一框 世界因生命而精彩 第三课 珍爱生命 他们一样吗? 她们一样吗? 人与其他动物.植物等生命相比,其突出的表现是( ) ...

  10. 计算机文档编辑ps知识,PS指导书_电脑基础知识_IT计算机_专业资料

    PS指导书_电脑基础知识_IT计算机_专业资料 (24页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦! 19.9 积分 游泳的鱼教程新建一个大小设置为780 ...

最新文章

  1. Delphi中使用ListView和TreeView的Item中的Data可能被忽略的内存泄漏
  2. 回复:lerit的关于对象中字段的初始化问题
  3. mysql主从数据丢失_故障分析 | 记一次 MySQL 主从双写导致的数据丢失问题
  4. 面向服务体系架构的业务规划和建模方法系列之二--基础概念辨析
  5. 详解在Visual Studio中使用git版本系统 [转]
  6. Spyder常用快捷键
  7. “超大杯”版小米10不仅有120W超级快充,电池也要比传闻大
  8. 发现个好玩的,去页面敲键盘,页面键变色
  9. 我当测试总监的那几年
  10. 高并发热点/单点数据_性能问题解决方案
  11. c语言 list 使用数组来实现_C|用数组或链表来实现队列这种抽象数据类型
  12. Case Study: 技术和商业的结合点在哪里?
  13. python用matplotlib或boxplot作图的时候,中文标注无法正常显示,乱码为小方框的解决办法
  14. 深度学习二分类问题--IMDB数据集
  15. ATL SERVER
  16. 主进程、子进程和守护进程
  17. 2021-03-26:给定一个正整数N,表示有N份青草统一堆放在仓库里。有一只牛和一只羊,牛先吃,羊后吃,它俩轮流吃草。 不管是牛还是羊,每一轮能吃的草量必须是:1,4,16,64…(4的某次方)。谁
  18. 微软中国正式宣布Win10政府版:专属定制安全功能
  19. 我是深圳南山的集体户口 要将我老婆的户口随迁入深圳 没有房产 可以办深圳人才中心的集体户口吗
  20. 花点时间自己DIY一款心仪的App

热门文章

  1. java drawingpanel_Java DrawingPanel.getHeight方法代码示例
  2. python中的try与if,python中if和try的区别是什么
  3. DS1819 对应版本的FFMPEG_OpenCV开发笔记(七十):红胖子带你傻瓜式编译VS2017x64版本的openCV4...
  4. java addcallback函数_java中怎么使用callback函数?
  5. c mysql 双主复制_mysql双主复制及使用keepalived作高可用的配置详解
  6. ssm前端时间格式转换
  7. ecshop根目录调用_ECSHOP各文件夹功能说明
  8. 机器视觉 光学工程专业_瑞士Idonus MEMS制造设备 创新技术 机器视觉测量(远心光学)...
  9. 文件读取 linux_Linux 进程、线程、文件描述符的底层原理
  10. from mysql partition select_玩转select条件查询,避免踩坑