数字的常用方法:

>>>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模块的方法:

>>> importmath>>>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模块的方法:

>>> importstring>>>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 inl) ‘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. 内网安全学习从入门到入狱-知识-内网基础知识

    内网安全学习从入门到入狱-知识-内网基础知识 文章目录 内网安全学习从入门到入狱-知识-内网基础知识 内网渗透基础 基本的名词介绍 工作组 域 活动目录(AD) DC 域控制器(DC) DNS域名服务 ...

  2. 内网安全学习从入门到入狱-知识-内网信息探测与收集

    内网安全学习从入门到入狱-知识-内网信息收集 内网信息收集-工作组和域内基本信息收集 内网安全学习从入门到入狱-知识-内网信息收集 0x01本机检查--先看看我是谁 查询并开启远程连接服务 0x02域 ...

  3. python语言中内置的字符串排版方法_python基础知识(python内置数据类型-字符串)...

    python中的字符串 字符串基本特点 字符串的本质是字符序列.python中的字符串是不可变的,无法对原字符串做任何修改(不能用下标赋值的方式去改变字符串).但是可以将字符串的一部分赋值创建新的字符 ...

  4. python爬虫需要对象编程吗_Python爬虫基础知识及前期准备

    学习爬虫有一小段时间了,于是决定把自己学爬虫时所学的,写过的代码以及看过的文档记录下来,权当小结.第一次写这些,如果有错误,请多指教. 首先我们需要了解一下什么是爬虫. 根据百度百科上给出的定义,&q ...

  5. python函数和模块有什么关键特性_零基础学python之函数与模块(附详细的代码和安装发布文件过程)...

    代码重用--函数与模块 摘要:构建函数,创建模块,安装发布文件,安装pytest和PEP 8插件,确认PEP8兼容性以及纠错 重用代码是构建一个可维护系统的关键. 代码组是Python中对块的叫法. ...

  6. python录音详解_Python实现电脑录音(含音频基础知识讲解)

    咪哥杂谈 本篇阅读时间约为 6 分钟. 1 前言 今天开始进入近期系列文章的第一篇,如何用 Python 来实现录音功能. 在开始"造轮子"之前,个人一直强调一个观点,如果有些东西 ...

  7. [Python学习] 专题二.条件语句和循环语句的基础知识

            前面讲述了"专题一.函数的基础知识",而这篇文章讲述的Python的条件语句和循环语句的基础知识.主要内容包括:         1.条件语句:包括单分支.双分支和 ...

  8. js判断对象为空_在 JavaScript 中如何检查对象为空

    下面的代码片段,用于检查对象是否为空.对于较新的浏览器,你可以使用 ES6 的 "Object.keys".?对于较旧的浏览器,可以安装Lodash库并使用其" isEm ...

  9. python学完那部分能写爬虫_[Python]新手写爬虫全过程(已完成)

    今天早上起来,第一件事情就是理一理今天该做的事情,瞬间get到任务,写一个只用python字符串内建函数的爬虫,定义为v1.0,开发中的版本号定义为v0.x.数据存放?这个是一个练手的玩具,就写在tx ...

  10. mysql 死锁监视器_并发基础知识:死锁和对象监视器

    mysql 死锁监视器 本文是我们名为Java Concurrency Essentials的学院课程的一部分. 在本课程中,您将深入探讨并发的魔力. 将向您介绍并发和并发代码的基础知识,并学习诸如原 ...

最新文章

  1. record-09 ATM 过程思想 综合练习
  2. 智能安防赛道上 国产AI芯片力挫群雄
  3. JS获取字符串实际长度!
  4. HTTP文件下载原理(OTA 下载 断点续传)
  5. 自学架构设计的一个好方法
  6. linux终端xwindow,如何从命令行重新启动X Window Server?
  7. python的所有库_Python 常用库
  8. Linux 定时执行shell 脚本
  9. 在MAC Xcode下安装OpenCV
  10. 爬虫python代码网易云_python-网易云简单爬虫
  11. Cocos Creator JS 获取当前日期与时间
  12. html加载富文本_Uniapp基础实战富文本框解析 WordPress rest api实例
  13. java 8进制 前是 零,从零学java笔录-第6篇 进制之间转换
  14. mysql操作SQL语句
  15. 【汇编语言】开发过程
  16. CSDN下载码如何使用以及免积分下载
  17. 蓝牙的重命名与波特率修改
  18. VMware中卸载Ubuntu
  19. vba代码换行的写法总结
  20. RGB色彩空间转CMYK色彩空间

热门文章

  1. 微信公众号config:invalid signature签名失效
  2. 关于开源项目《Scavenger》
  3. 每日一道leetcode(python)77. 组合
  4. 【数据库系统】第一部分 数据库基础(3) 关系数据库标准语言SQL(7) 视图
  5. 【IoT开发工具箱 | 02】嵌入式Linux设备网速测试方法
  6. 假期离校必备:Mac远程连接Win10桌面(设置断电自动重启、Win10配置远程桌面、Microsoft Remote Desktop Beta远程桌面连接、将Win作为服务器可以conda跑代码)
  7. python format()用法详解
  8. Cocos creator 学习笔记(2)
  9. 苹果电脑怎么删除旧账户_如何找到您不记得的旧在线帐户
  10. 出租车计价C语言程序