关于python
import random as ra=*88
for i in range(88):
a=[]
for j in range(88):
b=r.randint(0,1024)
a.append(b)
#请问为什么不能写成a=a.append(b)
x=eval(input("请输入一个代匹配的整数"))
for i in range(88):
for j in range(88):
if x==a:
print(i,j,sep="")
问题在注释中 a.append(b)这个没有返回值
你怎么拿去赋值 import random
a = *88
for i in range(88):
a = *88
for i1 in range(88):
a = random.randint(0,1024)
ran = int( input('请输入一个整数:') )
for i in range(len(a)):
for i1 in range(len(a)):
if a == ran:
print(i,i1)
我也刚看的这个视频我是这么写的
页:
[1]