小编lb4*_*_tv的帖子

嵌套循环Python

嗨我正在使用嵌套循环,但无法找到一种方法为我的嵌套循环开始一个新行:

for i in range(0,10):   
    for j in range(10):
        print(i,end =" ")
Run Code Online (Sandbox Code Playgroud)

产量

0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 …

python nested-loops python-3.x

1
推荐指数
1
解决办法
595
查看次数

标签 统计

nested-loops ×1

python ×1

python-3.x ×1