英文文档:isinstance(object, classinfo)Return true if the object argument is an instance of the classinfo argument, or of a (...
英文文档:class int(x=0) class int(x, base=10)Return an integer object constructed from a number or string x, or return 0 if...
介绍在python中,所有以“”双下划线包起来的方法,都统称为“magic method”,例如类的初始化方法 init ,python中所有的魔术方法均在官方文档中有相应描述,但是对于官方的描述比较混乱而且组织比较松散。很难找到有一个例子...
英文文档:input([prompt]) If the prompt argument is present, it is written to standard output without a trailing newline. The...
总结一下内置函数,build-in function。一、数学运算类abs(x)求绝对值complex([real[, imag]])创建一个复数pmod(a, b)分别取商和余数注意:整型、浮点型都可以float([x])将一个字符串或数...
英文文档:hex(x)Convert an integer number to a lowercase hexadecimal string prefixed with “0x”, for exampleIf x is not a Pyth...
英文文档:help([object]) Invoke the built-in help system. (This function is intended for interactive use.) If no argument is...
英文文档:hash(object)Return the hash value of the object (if it has one). Hash values are integers. They are used to quickly...
英文文档:hasattr(object, name)The arguments are an object and a string. The result is True if the string is the name of one...
英文文档:globals()Return a dictionary representing the current global symbol table. This is always the dictionary of the cur...