Operator包的应用
2024-10-21 09:42:30
# -*-coding:utf-8-*-
import operator
print(operator.add(1,1)) # 加
print(operator.sub(2,1)) #减
print(operator.mul(2,3)) # 乘
print(operator.truediv(6,2)) # 除
print(operator.contains("ab","a"))
print(operator.pow(2,3))
print(operator.ge(1,1)) # ge代表>=
print(operator.ge(2,1))
print(operator.le(1,2)) # le代表<=
print(operator.eq(1,1)) # eq代表=
最新文章
- div span
- Git分支管理
- DEV 财务货币格式单元格
- url 转码 urlencode和 urldecode
- [Guava官方文档翻译] 7. Guava的Immutable Collection(不可变集合)工具 (Immutable Collections Explained)
- 为xampp 安装pear db (database) 模块
- C# SetupCopyOEMInf安装驱动并返回DestinationInfFileNameComponent
- 使apache解析域名到目录的方法
- POJ 1955 Rubik&#39;s Cube
- 解决Perhaps you are running on a JRE rather than a JDK?问题
- [BZOJ2752][HAOI2012]高速公路
- Unity项目开发过程中常见的问题,你遇到过吗?
- vue Error: No PostCSS Config found in
- PyCharm使用秘籍
- 2018.6.10数据结构串讲_HugeGun
- Entity Framework Core: A second operation started on this context before a previous operation completed
- PostgreSQL 空间处理函数
- MariaDB第三章(select)
- linux系统切换用户
- Unity 5.1+ Assertion Library (断言库)