37804/python-typeerror-list-object-is-not-callable
I am getting an error while executing a python program. The line at which error is occurring is as follows:
print wordlists(len(words))
This the error I am getting:
TypeError: 'list' object is not callable.
The error says the list is not callable because you are trying to access/use a python list but using parenthesis for it. Parenthesis are used to call a function and because a list is not a function, you get this error. To access/use a python list, you should use square brackets. Try this:
print worldlists[len(words)]
Hi, @Ganapuram,
Could you please post here what you are trying to do and what exactly your error is? It will be helpful for me to investigate on that.
Try to print your output within a bracket.
print (worldlists[len(words)])
Hey @Suraj, For me its working fine. ...READ MORE
TRY THIS #Nomalisation for i in names: print(i) ...READ MORE
Try this: df['ln_returns'] = np.log(df['Close_mid']/df['Close_mid']) df['Close_mid'](1)) doesn't seem to ...READ MORE
Solve By Calling with Module Name Another solution to the TypeError: 'module' object ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
can you give an example using a ...READ MORE
You can simply the built-in function in ...READ MORE
The right datatype for destination in argpasrse module ...READ MORE
NameError: name 'xx' is not defined Python knows ...READ MORE
OR
Already have an account? Sign in.