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

Python内置函数

Python解释器具有许多始终可用的功能。这些函数称为内置函数。例如,print() 函数将给定对象打印到标准输出设备(屏幕)或文本流文件。

在Python 3.6(最新版本)中,有68个内置函数。它们按字母顺序列在下面,并附有简要说明。

 

Python abs()returns absolute value of a number
Python all()returns true when all elements in iterable is true
Python any()Checks if any Element of an Iterable is True
Python ascii()Returns String Containing Printable Representation
Python bin()converts integer to binary string
Python bool()Converts a Value to Boolean
Python bytearray()returns array of given byte size
Python bytes()returns immutable bytes object
Python callable()Checks if the Object is Callable
Python chr()Returns a Character (a string) from an Integer
Python classmethod()returns class method for given function
Python compile()Returns a Python code object
Python complex()Creates a Complex Number
Python delattr()Deletes Attribute From the Object
Python dict()Creates a Dictionary
Python dir()Tries to Return Attributes of Object
Python divmod()Returns a Tuple of Quotient and Remainder
Python enumerate()Returns an Enumerate Object
Python eval()Runs Python Code Within Program
Python exec()Executes Dynamically Created Program
Python filter()constructs iterator from elements which are true
Python float()returns floating point number from number, string
Python format()returns formatted representation of a value
Python frozenset()returns immutable frozenset object
Python getattr()returns value of named attribute of an object
Python globals()returns dictionary of current global symbol table
Python hasattr()returns whether object has named attribute
Python hash()returns hash value of an object
Python help()Invokes the built-in Help System
Python hex()Converts to Integer to Hexadecimal
Python id()Returns Identify of an Object
Python input()reads and returns a line of string
Python int()returns integer from a number or string
Python isinstance()Checks if a Object is an Instance of Class
Python issubclass()Checks if a Object is Subclass of a Class
Python iter()returns iterator for an object
Python len()Returns Length of an Object
Python list() Functioncreates list in Python
Python locals()Returns dictionary of a current local symbol table
Python map()Applies Function and Returns a List
Python max()returns largest element
Python memoryview()returns memory view of an argument
Python min()returns smallest element
Python next()Retrieves Next Element from Iterator
Python object()Creates a Featureless Object
Python oct()converts integer to octal
Python open()Returns a File object
Python ord()returns Unicode code point for Unicode character
Python pow()returns x to the power of y
Python print()Prints the Given Object
Python property()returns a property attribute
Python range()return sequence of integers between start and stop
Python repr()returns printable representation of an object
Python reversed()returns reversed iterator of a sequence
Python round()rounds a floating point number to ndigits places.
Python set()returns a Python set
Python setattr()sets value of an attribute of object
Python slice()creates a slice object specified by range()
Python sorted()returns sorted list from a given iterable
Python staticmethod()creates static method from a function
Python str()returns informal representation of an object
Python sum()Add items of an Iterable
Python super()Allow you to Refer Parent Class by super
Python tuple() FunctionCreates a Tuple
Python type()Returns Type of an Object
Python vars()Returns __dict__ attribute of a class
Python zip()Returns an Iterator of Tuples
Python __import__()Advanced Function Called by import

转载于:https://www.cnblogs.com/Xingtxx/p/11046136.html

相关文章:

  • CSS3属性—— line-clamp控制文本行数
  • 浏览器常用快捷键
  • 脾气
  • vue常用的修饰符
  • 为 Linux 应用程序编写 DLL
  • 3045流程设计
  • idea安装vue插件
  • 【BUAA-OO】第四单元作业总结
  • python学习-字符和编码
  • new Date() 在safari上遇到的问题
  • Linux安全加固
  • 解决打开IE报错“无法启动...丢失api-ms-win-core-path-l1-1-0.dll”的问题
  • 【JVM】符号引用和直接引用
  • Thread Future模式
  • 异常检测
  • [js高手之路]搞清楚面向对象,必须要理解对象在创建过程中的内存表示
  • [原]深入对比数据科学工具箱:Python和R 非结构化数据的结构化
  • 《Java编程思想》读书笔记-对象导论
  • 【347天】每日项目总结系列085(2018.01.18)
  • centos安装java运行环境jdk+tomcat
  • go语言学习初探(一)
  • mockjs让前端开发独立于后端
  • Mysql优化
  • PHP 的 SAPI 是个什么东西
  • Vue学习第二天
  • yii2权限控制rbac之rule详细讲解
  • 阿里云购买磁盘后挂载
  • 爱情 北京女病人
  • 搭建gitbook 和 访问权限认证
  • 浮动相关
  • 使用 Docker 部署 Spring Boot项目
  • 一份游戏开发学习路线
  • HanLP分词命名实体提取详解
  • 摩拜创始人胡玮炜也彻底离开了,共享单车行业还有未来吗? ...
  • ​Kaggle X光肺炎检测比赛第二名方案解析 | CVPR 2020 Workshop
  • # 透过事物看本质的能力怎么培养?
  • #《AI中文版》V3 第 1 章 概述
  • #include到底该写在哪
  • #免费 苹果M系芯片Macbook电脑MacOS使用Bash脚本写入(读写)NTFS硬盘教程
  • #我与虚拟机的故事#连载20:周志明虚拟机第 3 版:到底值不值得买?
  • $var=htmlencode(“‘);alert(‘2“); 的个人理解
  • (1)(1.19) TeraRanger One/EVO测距仪
  • (C语言)二分查找 超详细
  • (env: Windows,mp,1.06.2308310; lib: 3.2.4) uniapp微信小程序
  • (zt)最盛行的警世狂言(爆笑)
  • (保姆级教程)Mysql中索引、触发器、存储过程、存储函数的概念、作用,以及如何使用索引、存储过程,代码操作演示
  • (附源码)springboot码头作业管理系统 毕业设计 341654
  • (附源码)ssm旅游企业财务管理系统 毕业设计 102100
  • (轉)JSON.stringify 语法实例讲解
  • .a文件和.so文件
  • .CSS-hover 的解释
  • .net mvc部分视图
  • /var/lib/dpkg/lock 锁定问题
  • ?php echo $logosrc[0];?,如何在一行中显示logo和标题?
  • @angular/cli项目构建--http(2)