Home > other >  Python basic question
Python basic question

Time:03-20

Excuse me, where is wrong?

CodePudding user response:

This is all the code? List is redefined by you, when writing code, note variable naming don't function or keyword name repetition,
> List=[1, 2, 3, 4]
> C=(1, 2, 3, 4)
> B=list (c)
Traceback (the most recent call last) :
The File "& lt; Pyshell# 13 & gt;" , line 1, in
B=list (c)
TypeError: 'list' object is not callable

CodePudding user response:

reference 1/f, often should Carla, temperamental predominance, jing yi response:
this is all the code? List is redefined by you, when writing code, note variable naming don't function or keyword name repetition,
> List=[1, 2, 3, 4]
> C=(1, 2, 3, 4)
> B=list (c)
Traceback (the most recent call last) :
The File "& lt; Pyshell# 13 & gt;" , line 1, in
B=list (c)
TypeError: 'list' object is not callable

Understand, thank you!