|||
refer to : https://www.jb51.net/article/163756.htm
使用for...else...语法解决。
1 2 3 4 5 6 7 8 | for i in range ( 5 ): for j in range ( 5 ): print (i, j) if i = = 3 and j = = 3 : break else : continue break |
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-28 10:42
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社