Why does assigning `example = list(...)` raise a `TypeError: 'list' object is not callable`?

I ran into a confusing error while following a Python tutorial in the interactive shell, and I’m trying to understand what’s going on.

According to the tutorial, this line should convert a string into a list of characters:

example = list("easyhoss")

The expected result is:

['e', 'a', 's', 'y', 'h', 'o', 's', 's']

However, instead of working, I get the following error:

TypeError: 'list' object is not callable

I didn’t change anything obvious in the tutorial code, so I’m confused about why Python thinks list is not callable here. How does this situation even happen, and what usually causes a TypeError: ‘list’ object is not callable in cases like this?

I’d appreciate an explanation of what’s going wrong and how to avoid this kind of issue in the future. Thanks!

I’ve definitely run into this before. The most common reason Python says TypeError: ‘list’ object is not callable in this situation is that somewhere earlier in your session, you accidentally assigned something to the name list. For example:

list = ['a', 'b', 'c']

After doing this, the built-in list() function is shadowed by your variable, so when you later try to call:

example = list("easyhoss")

Python thinks you’re trying to “call” the list [‘a’, ‘b’, ‘c’] as a function — which obviously doesn’t work. The fix is usually to either restart your Python session or delete/rename the variable that’s shadowing the built-in:

del list
example = list("easyhoss")```

From my experience, this is a great reminder to never use built-in names like list, str, or dict for your variables. Even if your code runs for a bit, it can cause weird errors later. I usually add a _ or a suffix to my variable names to avoid conflicts:

my_list = list("easyhoss")

This way, you’ll never accidentally overwrite the built-in function, and your code stays safe.

If you’re not sure whether something is shadowing a built-in, you can check the type before calling it:

print(type(list))

If it shows <class 'list'> instead of <class 'type'>, you know you’ve accidentally reassigned list somewhere. This little check saved me a few headaches when debugging interactive sessions in Python. Once you’ve restored the original list function, everything works as expected:

example = list("easyhoss")
print(example)  # ['e', 'a', 's', 'y', 'h', 'o', 's', 's'] ```


In short, the TypeError usually isn’t about the code itself — it’s about your session environment shadowing the built-in list. Renaming variables or restarting the session usually clears it up.