下面两段Python代码都是用于求1-10的和,其运行结果相同。通常说来,for-in循环都可以用while循环实现。( )
tnt = 0
for i in range(1,10 + 1):
tnt += i
print(tnt)
i = 1
while i <= 10:
i += 1
对
错