![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
s = 'alexeweuesir' print('%'.join(s))
join用法
while else 语句 如果遇到了break 就会跳出程序不执行else
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
# for i in s: # print(i) # if i == 'e': # break # for i in s: # if i == 'e': # continue # print(i)
pass是跳过当前循环进入下一个循环
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
# while True: # pass # else: # pass for i in s: if i == 'e': pass print(i) else: print(666)