課程
/后端開發
/Python
/初識Python
為什么我在命令提示符里面輸入?print 'hello,' or a or 0 輸出的是hello,print 'hello,' or a and 0 出來是hello(不該是0嗎?)
2016-07-04
源自:初識Python 3-9
正在回答
按照從優先級最高到最低的順序,布爾運算符有:Not、And、Or、Xor、Eqv 和 Imp。
print 'hello,' or a and 0
1. a and 0??--> 0 ?
2. 'hello,'?or 0 ?--> 'hello,'?? ?
weibo_喵喵喵喵喵到底有多少_03593603 提問者
街頭霸王洗髮水 回復 weibo_喵喵喵喵喵到底有多少_03593603 提問者
0 false
舉報
學python入門視頻教程,讓你快速入門并能編寫簡單的Python程序
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2016-07-05
按照從優先級最高到最低的順序,布爾運算符有:Not、And、Or、Xor、Eqv 和 Imp。
print 'hello,' or a and 0
1. a and 0??--> 0 ?
2. 'hello,'?or 0 ?--> 'hello,'?? ?
2016-07-05
0 false