小编Mat*_*att的帖子

AttributeError: 'tuple' 对象没有属性 'append'

任何人都可以帮助我使用此代码吗?

Jobs = ()
openFile = open('Jobs.txt')
x = 1
while x != 0:
    Stuff = openFile.readline(x)
    if Stuff != '':
        Jobs.append(Stuff)
    else:
        x = 0
Run Code Online (Sandbox Code Playgroud)

此代码抛出:

AttributeError: 'tuple' object has no attribute 'append'
Run Code Online (Sandbox Code Playgroud)

我正在使用 Python 3.6。

python tuples

3
推荐指数
1
解决办法
3万
查看次数

标签 统计

python ×1

tuples ×1