__author__ = 'minggxu9' t = 12345, 54321, 'hello!' print(t[0]) print(t) u = t, (1, 2, 3, 4, 5) print(u) a = [-1, 1, 66.25, 333, 333, 1234.5] del a[0] print(a) del a[2:4] #第3,4个 print(a)
另一个
__author__ = 'minggxu9' if __name__ == '__main__': # when run as a script a, b = 0, 1 while b < 10: a, b = b, a+b print(b) q = [2, 3] p = [1, q, 4] len(p) print("p[1]:\t",p[1]) print(p[1][0]) p[1].append('xtra') print(p) print(q) i = 256*256 print('The value of i is', i) print("7//3=",7//3) print("7//-3=",7//-3) a, b = 0, 1 while b < 1000: a, b = b, a+b print(b, end=',')