python的内建函数built-in functions




之前将关键字和内建函数给弄混淆了,现在系统的总结一下python2.7内建函数。

abs() 绝对值

all()可迭代对象都为真

any()可迭代对象任意一个为真

basestring() 不可直接调用的 isinstance(obj, basestring) is equivalent to isinstance(obj, (str, unicode)).

bin() Convert an integer number to a binary string(将整型转化为二进制字符)

bool() 返回布尔值True or False

bytearray

callable() Return True if the object argument appears callable

chr(i) Return a string of one character whose ASCII code is the integer i

classmethod

cmp(x,y) Compare the two objects x and y and return an integer according to the outcome. The return value is negative if x < y, zero if x == yand strictly positive if x > y.

compile()

complex()

delattr()

dict() 创造一个字典类型

dir()




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值