你的位置:首页 > 信息动态 > 新闻中心
信息动态
联系我们

Python类型运算符和内建函数总结

2021/12/28 15:39:09

标准类型运算符和内建函数

Operator/FunctionDscriptionResult
String
``String representationst
Built-in functions
        cmp(obj1,obj2)Compares two objectsin        
repr(obj)String representationst
str(obj)String representationst
type(obj)Determines object typetyp
Value comparisons
<Less thanboo
>Greater thanboo
<=Less than or equal toboo
>=Greater than or equal toboo
==Equal toboo
!=Not equal toboo
<>Not equal toboo
Object comparisons
isThe same asboo
is notNot the same asboo
Boolean operators
notLogical negationboo
andLogical conjunctionboo
orLogical disjunctionboo