Re: 废文

楼主: zoeredbird (柔依‧红鸟)   2023-12-09 10:36:59
for a in range (10):
for b in range (10):
if a==0 or b==0:
continue # 跳过 a = 0 和 b = 0的情况
print (a, "*",b,"=",a*b)
作者: wwndbk (黑人问号)   2023-12-09 10:39:00
大师用range(1, 10)的话就不用后面的条件了 因为已经从1开始

Links booklink

Contact Us: admin [ a t ] ucptt.com