成功的将列表倒序了,为什么运行结果不是我期待的300,加了if判断为啥运行结果不对?
我希望得到300,运行结果却是119。
print(122+178)
ip = ['96', '23', '122', '178']
intip = 0
for i in range(len(ip)-1,-1,-1):
if i == 0:
intip += int(ip[i])
continue
if i == 1:
intip += int(ip[i])
continue
print(intip)
--
修改:javame FROM 45.124.125.*
FROM 45.124.125.*