Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Python by (47.6k points)

I am a novice to Python and following a tutorial. There is an example of list in the tutorial :

example = list('easyhoss')

Now, In tutorial, example= ['e','a',...,'s']. But in my case I am getting the following error:

>>> example = list('easyhoss') 

Traceback (most recent call last): 

File "<stdin>", line 1, in <module> 

TypeError: 'list' object is not callable

Please tell me where I am wrong. I searched SO this but it is different.

1 Answer

0 votes
by (106k points)

You can use the below-mentioned code to get rid of this error:-

>>> example = list('easyhoss') 

>>> list = list('abc') 

>>> example = list('easyhoss') 

Related questions

0 votes
1 answer
asked Aug 30, 2019 in Python by Sammy (47.6k points)
+1 vote
1 answer
0 votes
1 answer
asked Sep 26, 2019 in Python by Sammy (47.6k points)
0 votes
0 answers

Browse Categories

...