多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# Python代码 99乘法表 ~~~ for i in range(1,10): for y in range(1,i+1): msg = '{0}*{1}={2}'.format(i,y,i*y) print(msg,end='\t') print() ~~~ 冒泡排序 ![](https://img.kancloud.cn/15/43/1543c0b97237bb55063e033959706ca0_801x315.gif) ~~~ a = [9,2,3,1,6,7,0] # 确定循环次数为 列表长度-1次 times = len(a) -1 while times > 0: for i in range(times): if a[i] < a[i+1]: a[i],a[i+1]=a[i+1],a[i] times = times -1 print(a) ~~~