int()参数必须是字符串或数字,而不是“内置函数”或“方法”-python

2024-05-29 00:05:52 发布

您现在位置:Python中文网/ 问答频道 /正文

回溯说:

Traceback (most recent call last):
  File "dex.py", line 37, in <module>
    n=int(raw_input)
TypeError: int() argument must be a string or a number, not 'builtin_function_or_method'

以及代码:

t[n]=1

其中t是t=[0, 0, 0, 0, 0, 0, 0, 0, 0 ,0] n是int(raw_input)

我基本上是想把t的索引n设置为int(raw_input)


Tags: orinpymostinputrawlinecall

热门问题