除法不一樣

Python2 中除法默認向下取整,所以 1/2 = 0,爲整型。web For (plain or long) integer division, the result is an integer. The result is always rounded towards minus infinity: 1/2 is 0, (-1)/2 is -1, 1/(-2) is -1, and (-1)
相關文章
相關標籤/搜索