TypeError: 'str' object is not callable
You used parentheses on something that isn’t a function — often a variable shadowing a built-in.
Seen on:
Python
Meaning
Naming a variable list, str, dict, input or sum replaces the built-in, so a later list(...) calls your variable. Missing commas or operators (2(3)) cause it too.
Common causes
- Variable named like a built-in (list = [...], str = "...")
- Property accessed with ()
- Missing * or , in an expression
- Module imported instead of a function inside it
⚡ Quick fix
- Rename the variable that shadows the built-in
- Remove the () when accessing a property
- Import the function: from module import function
Detailed fix by platform
Python
del listin an interactive session restores the built-in after shadowing it
How to diagnose
- Name — Which name is being called?
- Shadowing — Was it reassigned earlier?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026