課程
/后端開發
/Python
/初識Python
那比較兩個數在python中是哪個函數
2018-04-02
源自:初識Python 7-2
正在回答
import operator? ? ? ?#首先要導入運算符模塊
operator.gt(1,2)? ? ? #意思是greater than(大于)
operator.ge(1,2)? ? ? #意思是greater and equal(大于等于)
operator.eq(1,2)? ? ? #意思是equal(等于)
operator.le(1,2)? ? ? #意思是less and equal(小于等于)
operator.lt(1,2)? ? ? #意思是less than(小于)
舉報
學python入門視頻教程,讓你快速入門并能編寫簡單的Python程序
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-04-02
import operator? ? ? ?#首先要導入運算符模塊
operator.gt(1,2)? ? ? #意思是greater than(大于)
operator.ge(1,2)? ? ? #意思是greater and equal(大于等于)
operator.eq(1,2)? ? ? #意思是equal(等于)
operator.le(1,2)? ? ? #意思是less and equal(小于等于)
operator.lt(1,2)? ? ? #意思是less than(小于)