Discuss / Python / 文中的这段程序运行出错

文中的这段程序运行出错

Topic source

报三春晖

#1 Created at ... [Delete] [Delete and Lock User]

sum = 0 for x in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]: sum = sum + x print(sum)

后问了qq群里的高,说print没有跳出for循环。

报三春晖

#2 Created at ... [Delete] [Delete and Lock User]

输入完sum+x,按两次回车跳出for循环


  • 1

Reply