【Audio】Audio encoder相关Benchmark
2026/7/18 20:08:22
count=0whilecount<5:print(count,end=" ")# 0 1 2 3 4count+=1# while-else:循环正常结束(未 break)时执行 elsen=0whilen<3:print(n)n+=1else:print("循环正常结束")# 遍历列表fruits=["apple","banana","cherry"]forfruitinfruits:print(fruit)# 遍历字符串forcharin"Python":print(char,end=" ")# P y t h o n# for-elseforitemin[1,2,3]:ifitem==10:print("找到了")breakelse:print("未找到")# 输出:未找到range(stop)# 0 到 stop-1range(start,stop)# start 到 stop-1range(start,stop,step)foriinrange(5):# 0, 1, 2, 3, 4print(i)foriinrange(2,6):# 2, 3, 4, 5print(i)foriinrange(10,0,-2):# 10, 8, 6, 4, 2print(i)# 带索引的遍历fruits=["apple","banana","cherry"]fori,fruitinenumerate(fruits):print(f"{i}:{fruit}")# 0: apple# 1: banana# 2: cherrybreak# 跳出整个循环continue# 跳过当前迭代,进入下一次pass# 占位符,什么都不做上一篇:[[Python-条件判断]] | 下一篇:[[Python-推导式]]