我试着做一个循环,每次循环都会改变变量
list0 = []
list1 = []
list2 = []
value = 0
for _ in range(3):
list_l = ("list" + str(value))
list_l.append("Apple")
value += 1
print(list0)
print(list1)
print(list2)
获取错误
AttributeError: 'int' object has no attribute 'append'
Tags:
这就是你要找的吗?
https://www.online-python.com/LzbkxdmNA8
输出:
相关问题 更多 >
编程相关推荐