随笔分类 - python 内置函数
摘要:英文文档: 2. 不传入参数时,生成的空的不可变集合。
阅读全文
摘要:英文文档: 根据传入的参数生成一个新的集合 说明: 1. 传入一个可迭代对象,生成一个新的集合。 2. 不传入参数时,生成一个新的空集合。 3. 返回的集合是可以修改的。
阅读全文
摘要:英文文档: class dict(**kwarg) class dict(mapping, **kwarg) class dict(iterable, **kwarg) Return a new dictionary initialized from an optional positional a
阅读全文
摘要:英文文档: class list([iterable]) Rather than being a function, list is actually a mutable sequence type, as documented in Lists and Sequence Types — list,
阅读全文
摘要:英文文档: The constructor builds a tuple whose items are the same and in the same order as iterable‘s items. iterable may be either a sequence, a containe
阅读全文
摘要:英文文档: hex(x) Convert an integer number to a lowercase hexadecimal string prefixed with “0x”, for example If x is not a Python int object, it has to de
阅读全文
摘要:英文文档: 将整数转换为8进制的字符串 2. 如果传入参数不是整数,则其必须是一个定义了__index__并返回整数函数的类的实例对象。
阅读全文
摘要:英文文档: bin(x) Convert an integer number to a binary string. The result is a valid Python expression. If x is not a Python int object, it has to define
阅读全文
摘要:英文文档: 2. 它的功能与ord函数刚好相反 3. 传入的参数值范围必须在0-1114111(十六进制为0x10FFFF)之间,否则将报ValueError错误
阅读全文
摘要:英文文档: 返回 unicode 字符对应的整数 2. 其功能和chr函数刚好相反。
阅读全文
摘要:英文文档: class memoryview(obj) 根据输的内容创建一个内存查看对象。 说明: 1. 函数功能返回内存查看对象,实际上是内存查看对象(Momory view)的构造函数。 2. 所谓内存查看对象,是指对支持缓冲区协议的数据进行包装,在不需要复制对象基础上允许Python代码访问。
阅读全文
摘要:英文文档: class bytes([source[, encoding[, errors]]]) Return a new “bytes” object, which is an immutable sequence of integers in the range 0 <= x < 256. b
阅读全文
摘要:英文文档: class bytearray([source[, encoding[, errors]]]) Return a new array of bytes. The bytearray class is a mutable sequence of integers in the range
阅读全文
摘要:英文文档: class str(object='') class str(object=b'', encoding='utf-8', errors='strict') Return a string version of object. If object is not provided, retu
阅读全文
摘要:英文文档: class complex([real[, imag]]) Return a complex number with the value real + imag*1j or convert a string or number to a complex number. If the fi
阅读全文
摘要:英文文档: class float([x]) Return a floating point number constructed from a number or string x. If the argument is a string, it should contain a decimal
阅读全文
摘要:英文文档: class int(x=0) class int(x, base=10) Return an integer object constructed from a number or string x, or return 0 if no arguments are given. If x
阅读全文
摘要:英文文档: class bool([x]) Return a Boolean value, i.e. one of True or False. x is converted using the standard truth testing procedure. If x is false or o
阅读全文
摘要:英文文档: sum(iterable[, start]) Sums start and the items of an iterable from left to right and returns the total. startdefaults to 0. The iterable‘s item
阅读全文
摘要:英文文档: round(number[, ndigits])Return the floating point value number rounded to ndigits digits after the decimal point. If ndigits is omitted, it retu
阅读全文