妙啊,我写的时候就在纠结解包之后数字中间有个空格{:10_275:} March2615 发表于 2020-4-26 18:39
妙啊,我写的时候就在纠结解包之后数字中间有个空格
{:10_256:}
搞懂print函数的那几个参数就行了 抢最佳晚了一步……{:10_266:} x = 1
y = 1
while (1 <= x <= 8) :
if (1 <= y <= 8) :
if (x != y) :
print(x*10 + y)
y = y + 1
else:
y = y + 1
else :
y = 1
x = x + 1 回个复{:10_256:} for a in range(1, 9):
m = a * 10
for b in range(1, 9):
if a != b:
n = m + b
print(n, end = ' ')
for i in range(1,9):
for j in range(1,9):
x = str(i)+str(j)
if i != j:
print(x) 本帖最后由 阿傻 于 2020-5-19 09:28 编辑
for i in range(1,9):
for j in range(1,9):
if i==j:
continue
else:
print(i,end="")
print(j,end="\n")
for i in range(1,9):
for s in range(1,9):
if i == s :
pass
else:
print(str(i)+str(s))
sum=[]
x=['1','2','3','4','5','6','7','8']
y=['1','2','3','4','5','6','7','8']
for a in range(len(x)):
for b in range(len(y)):
if x!=y:
temp=x+y
sum.append(temp)
print(sum)
print(len(sum)) n = 1
while n<=8:
for i in range(1,9):
combin = "{}{}".format(n,i)
if n != i:
print(int(combin))
n+=1
{:10_254:} for i in range(1,9):
for j in range(1,9):
if i != j:
print(10*i+j)
i = 1
j = 1
for i in range(1,9):
for j in range(1,9):
if (i != j):
print(str(i)+str(j))
j+=1
i+=1
{:5_95:} 学习 1469396970 发表于 2020-4-26 16:25
一不留神手滑了
for shiwei in range(1,9):
我是小白 表示就看懂你这个了
for i in range(1,9):
for j in range(1,9):
if i!=j:
m=i*10+j
print(m) for i in range(1,9):
for j in range(1,9):
if i!=j:
print(i*10+j)
j+=1
i+=1
print('---end---')
页:
1
[2]