Last modified: Apr 23, 2026 By Alexander Williams

Fix 'list' object is not callable Python

Python is a powerful and beginner-friendly language. But even simple mistakes can cause confusing errors. One common error is TypeError: 'list' object is not callable. This error stops your code from running.

Don't worry. This error is easy to fix. This article explains exactly what causes it and how to solve it. We will use short code examples and clear explanations. You will learn to avoid this error in your future projects.

What Does This Error Mean?

In Python, you use parentheses () to call a function. For example, print() or len(). If you try to use parentheses on a list variable, Python thinks you want to call it like a function. But a list is not a function. So Python raises the error.

The error message looks like this:


TypeError: 'list' object is not callable

This means you used () on a variable that holds a list. Python expects a function, not a list.

Common Causes and Fixes

There are two main reasons for this error. Let's look at each one.

1. Using Parentheses Instead of Square Brackets

The most common cause is using () to access an index in a list. List indices must use square brackets [].

Here is an example that causes the error:


# Wrong: using parentheses to access list index
fruits = ["apple", "banana", "cherry"]
print(fruits(0))  # This will cause the error

Output:


TypeError: 'list' object is not callable

The fix is simple. Replace parentheses with square brackets.


# Correct: using square brackets to access list index
fruits = ["apple", "banana", "cherry"]
print(fruits[0])  # Correct output: apple

Output:


apple

Always remember: lists use square brackets for indexing. Functions and methods use parentheses.

2. Accidentally Overriding a Built-in Function

Another cause is naming a variable the same as a built-in function. For example, if you create a list named list, you hide Python's built-in list() function. Later, if you try to use list() to create a new list, Python sees the list variable and raises the error.

Here is an example:


# Accidentally overriding the built-in list() function
list = [1, 2, 3]  # This creates a variable named 'list'
print(list)       # This works fine

# Now try to use list() to create a new list
new_list = list("hello")  # Error! 'list' is now a list, not a function

Output:


[1, 2, 3]
TypeError: 'list' object is not callable

To fix this, rename your variable. Use a different name like my_list or numbers. This avoids shadowing the built-in function.


# Correct: use a different variable name
my_list = [1, 2, 3]
print(my_list)

# Now list() works correctly
new_list = list("hello")
print(new_list)  # Output: ['h', 'e', 'l', 'l', 'o']

Output:


[1, 2, 3]
['h', 'e', 'l', 'l', 'o']

This same problem can happen with other built-in functions like str, int, or len. Avoid naming variables after built-in functions.

How to Debug This Error

When you see this error, follow these steps:

  1. Look at the line number in the error traceback.
  2. Check if you used () on a list variable. Change it to [].
  3. Check if you named a variable after a built-in function, like list, str, or len. Rename it.
  4. Use print(type(your_variable)) to see what type your variable is. If it says <class 'list'>, you know the problem.

For more help with Python errors, read our guide on Python TypeError: Causes and Fixes. It covers many common mistakes.

Real-World Example

Imagine you are writing a program to manage student grades. You create a list of grades. Then you try to access the first grade.


# Real-world mistake
grades = [85, 90, 78, 92]
print(grades(0))  # Error: using parentheses

Output:


TypeError: 'list' object is not callable

Fix it by using square brackets:


# Correct version
grades = [85, 90, 78, 92]
print(grades[0])  # Output: 85

Output:


85

Now your program works correctly.

Best Practices to Avoid This Error

  • Always use square brackets for list indexing. Never use parentheses.
  • Use descriptive variable names. Avoid names like list, str, or dict.
  • Be careful with loops. Sometimes people accidentally reuse a variable name inside a loop.
  • Test small pieces of code before building larger programs. This helps catch errors early.

If you want to dive deeper into Python error handling, check out our article on Python TypeError: Causes and Fixes. It explains other common errors and solutions.

Conclusion

The TypeError: 'list' object is not callable error is easy to fix. It happens when you use parentheses on a list instead of square brackets, or when you name a variable after a built-in function. Always check your code for these mistakes. Use clear variable names and proper syntax. With these tips, you can avoid this error and write cleaner Python code.