在python中,如果幂运算前有正负号,则-+的优先级会比**低。 而当-+在**后面时,优先级会比**高。 ``` Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:35:05) on win32 Type "copyright", "credits" or "license()" for more information. -9 ** 0.5 -3.0 - (9 ** 0.5) -3.0 ...
shuzu = print (shuzu) aLen = len (shuzu) #使用len函数获取数组的大小 for key in range (aLen-1): #range 产生一个数组 for x in range (aLen - key -1): if shuzu shuzu : shuzu , shuzu = shuzu , shuzu #用Key在range里提取数字x,用数字x去对比后 ...