為什么出來的都是hello python?
a?=?'python' print('hello',?a?or?'world')
為什么出來的都是hello Python?'world'不是非空字符串嗎?Ture or Ture #==>Ture那為什么不是hello world?
a?=?'python' print('hello',?a?or?'world')
為什么出來的都是hello Python?'world'不是非空字符串嗎?Ture or Ture #==>Ture那為什么不是hello world?
2020-09-26
舉報
2020-10-04
如果a為True,則a or b的值為a,所以Python和World選前面的一個Python
詳見短路問題一塊
2020-09-27
沒認(rèn)真聽課吧
2020-09-27
仔細(xì)看看上面的內(nèi)容 ,a or b ,返回為true的一個 ,不為空 也是true