标签:
names = [‘Michael‘, ‘Bob‘, ‘Tracy‘] for name in names: print name
sum = 0 for x in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]: sum = sum + x print sum
sum = 0 n = 99 while n > 0: sum = sum + n n = n - 2 print sum
以上这三种就已经够用了
标签:
原文地址:http://www.cnblogs.com/my-time/p/4502793.html