小编and*_*All的帖子

我无法在列表中添加int

list == []

def MultiplesNumber(a):
    for i in range(1, a+1):
             if a % i == 0:
                    return i

list.append(MultiplesNumber(100))
TypeError: descriptor 'append' requires a 'list' object but received a 'int'
Run Code Online (Sandbox Code Playgroud)

我不能添加ilist,任何想法?

python data-structures python-3.x python-3.4

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

标签 统计

data-structures ×1

python ×1

python-3.4 ×1

python-3.x ×1