暑期进阶测评(终)
以下遍历累加代码的功能是?
total = 0 for num in [1, 2, 3]: total += num
A B
AB
A\nB
Line1 Line2
Line1\nLine2
Line1Line2
以下代码的输出是?
`print("Hello", end="!")` `print("World")`
以下遍历累加代码中`total`的最终值是?
total = 0 for i in [3, 1, 4]: total = i