码迷,mamicode.com
首页 > 其他好文 > 详细

内置函数

时间:2017-08-01 19:20:58      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:绝对值   exec   数据结构   input   set   进制   数学运算   结构   最大值   

一.基础数据类型相关(38)

  1.和数字相关(14)

   数据类型

   bool、int、float、complex

   进制转换

   bin(二进制)、oct(八进制)、十六进制(hex)

   数学运算

   abs(计算绝对值)、divmod(返回商和余数)、min(计算最小值)、max(计算最大值,参数是一个序列类型)sum(求和,参数:序列类             型)round(小数精确)pow(幂运算)

    3.和数据结构相关

  元组和列表

  相关内置函数:reserved、slice

  字符串

  str、format、bytes、bytearray、memoryview、ord、chr、ascii、repr

  字典(dic)集合(set、frozenset)

  相关内置函数

  len、enumerate、all、any、zip、filter、map、sorted

二.str类型代码的执行

  eval、exec、compile

三.其他

  input、print、type、hash、id、open、import、help、callable、dir

   

  

 

内置函数

标签:绝对值   exec   数据结构   input   set   进制   数学运算   结构   最大值   

原文地址:http://www.cnblogs.com/sxh-myblogs/p/7269719.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!