print [int(str(m)+str(n)+str(o)) for m in range(1,10) for n in range(0,10) for o in range(1,10) if m == o]
2020-08-05
sum = 0
x = 1
n = 1
while True:
sum+=x
n+=1
x=2**(n-1)
if n>20:
break
print sum
x = 1
n = 1
while True:
sum+=x
n+=1
x=2**(n-1)
if n>20:
break
print sum
2020-08-03
for x in range(1,9):
for y in range(x+1,10):
if x < y:
print(x*10 + y)
for y in range(x+1,10):
if x < y:
print(x*10 + y)
2020-08-01
最新回答 / 慕虎3074761
return 一般是返回运行结果。 就像我们做数学计算题,会有计算结果;至于返回到哪里,我的理解是 返回到 def 函数名称(参数),用作结果显示
2020-07-31