标签:python float strong 返回结果 add efi 需要 访问 location
#Say something NOT IMPORTANT
Python不需要用int, float, double
来define
变量
短路计算。
所以,Python解释器在做布尔运算时,只要能提前确定计算结果,它就不会往后算了,直接返回结果。
够懒!!
python classmates = [‘Michael‘, ‘Bob‘, ‘Tracy‘]
与数组相同,例如classmate[0] = Michael
,此外,List还可以倒序访问,例如classmate[-1] = Tracy
#Say something NOT IMPORTANT
classmate.append("new_classmate") #Add in the END
classmate.insert(1,"new_classmate") #Add in the 2nd location
#Say something NOT IMPORTANT
classmate.opp() #Delete the FINAL
classmate.insert(1) #Delete the 2nd
#Say something NOT IMPORTANT
classmate[0] = 'You'
classmate[-1] = 'Me'
tuple一旦创建就不能修改
Like List
classmates = ('Michael', 'Bob', 'Tracy')
className = ('Metoo',) #Create single element
t = ('a', 'b', ['A', 'B'])
L = t[2]
L[0] = 'hha'
L[1] = 'lla'
标签:python float strong 返回结果 add efi 需要 访问 location
原文地址:http://www.cnblogs.com/pualus/p/7930286.html