【Python】Learn Python the hard way, ex33 while循环
来源:互联网 发布:我欲封天灵珠升阶数据 编辑:程序博客网 时间:2024/05/22 14:43
i = 0numbers = []while i < 6: print "At the top i is %d" % i numbers.append(i) i += 1 print "Numbers now: ", numbers print "At the bottom i is %d" % iprint "The numbers: "for num in numbers: print num """Test Result:At the top i is 0Numbers now: [0]At the bottom i is 1At the top i is 1Numbers now: [0, 1]At the bottom i is 2At the top i is 2Numbers now: [0, 1, 2]At the bottom i is 3At the top i is 3Numbers now: [0, 1, 2, 3]At the bottom i is 4At the top i is 4Numbers now: [0, 1, 2, 3, 4]At the bottom i is 5At the top i is 5Numbers now: [0, 1, 2, 3, 4, 5]At the bottom i is 6The numbers: 012345"""
0 0
- 【Python】Learn Python the hard way, ex33 while循环
- Learn Python The Hard Way学习(33) - While循环
- Learn Python The Hard Way
- Learn Python The Hard Way
- 【Python】Learn Python the hard way, ex32 for循环
- Learn Python The Hard Way学习(32) - 循环和列表
- Learn Python the Hard Way ex48
- 学《learn python the hard way》(3)
- learn python the hard way 的ex48
- Learn Python The Hard Way-Ecercise1~5
- Learn Python The Hard Way-Ecercise6~10
- Learn Python The Hard Way-Ecercise11~15
- Learn Python The Hard Way-Ecercise16~20
- Learn Python The Hard Way-Ecercise21~25
- Learn Python The Hard Way-Ecercise26~30
- Learn Python The Hard Way-Ecercise31~35
- Learn Python The Hard Way-Ecercise36~40
- Learn Python The Hard Way exercise 42
- web项目出现的异常
- 关于C++中的友元函数的总结
- C/C++ 字节序/位域(Bit-fields)
- 矩阵乘法
- 无常
- 【Python】Learn Python the hard way, ex33 while循环
- 设计模式之桥接模式
- DevExpress SpreadsheetControl 分组
- 在线聊天室小程序
- 【Foundaton-10-3】#import <Foundation/NSArray.h>字符串操作
- 题解___CodeForces 527A___2015_10_个人赛_1004
- 怎样将Excel里的行和列隐藏和取消隐藏
- C/C++ 32位/64位 sizeof(数据类型)
- Spring官网改版后下载