<分区> 分区>
我想通过函数打印列表中的项目,但它说
TypeError: 'list' object is not callable
这是我的代码:
list = ['oi', 'hi', 'hello']
def print_item(index):
print(list(index))
预期的输出是它根据索引打印项目
<分区> 分区>
我想通过函数打印列表中的项目,但它说
TypeError: 'list' object is not callable
这是我的代码:
list = ['oi', 'hi', 'hello']
def print_item(index):
print(list(index))
预期的输出是它根据索引打印项目