这个是语法的问题么??
for x in [ 1,2,3,4,5,6,7,8,9 ]:
for y in [ 0,1,2,3,4,5,6,7,8,9 ]:
if x<y:
print x*10+y
输出就是乱码
但是
for x in [ 1,2,3,4,5,6,7,8,9 ]:
for y in [ 0,1,2,3,4,5,6,7,8,9 ]:
if x<y:
(加了一个空格)print x*10+y
就能输出正确答案了?这是什么原理
for x in [ 1,2,3,4,5,6,7,8,9 ]:
for y in [ 0,1,2,3,4,5,6,7,8,9 ]:
if x<y:
print x*10+y
输出就是乱码
但是
for x in [ 1,2,3,4,5,6,7,8,9 ]:
for y in [ 0,1,2,3,4,5,6,7,8,9 ]:
if x<y:
(加了一个空格)print x*10+y
就能输出正确答案了?这是什么原理
2018-11-12
举报