作者wfgh (lyle)
看板Python
標題[問題] not的用法
時間Sat Sep 8 22:56:32 2012
not 1 == False
#True
False == not 1
#SyntaxError: invalid syntax
根據下面的文件
http://docs.python.org/reference/expressions.html
precedence: not 高於 ==
為什麼第二種寫法會出錯呢?
謝謝:)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 36.232.211.192
→ vocaloid:from lowest to highest... 09/08 23:45
→ wfgh:抱歉...我眼殘了 09/08 23:57