💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 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) ~~~