Python 学习笔记-数据结构之int
int类型包含:整形integer/浮点float/复数complex
- 算术运算符: + - * /(浮点除) %(取余) **(求幂) //(取整除)
- 比较运算符: > < == >= <= !=
- 运位运算符: 略
- 进制转换: bin/oct/hex/int 这四个内置函数的运用
- int类还定义了四个方法:bit_length(返回转换成二进制后实际的位数), conjugate, from_bytes, to_bytes
- int类还定义了四个属性:imag, real, numerator, denominator