Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (Retired) Shopping List Lists

I put in the console(python) exactly this: list('hello') but i got a message :TypeError: 'str' object is not callable

Hi, Do you help me somebody?

2 Answers

Chris Freeman
Chris Freeman
68,469 Points

list('hello') is legal syntax. Run in the interactive shell:

$ python
Python 3.4.0 (default, Jun 19 2015, 14:20:21) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> list('hello')
['h', 'e', 'l', 'l', 'o']

Can you elaborate on what you mean "in the console(python)"?

Chris Freeman
Chris Freeman
68,469 Points

Why did this get a downvote?

Thanks, now is working well, but i also have a problem in the shell window: [] {} these types are not work well.

BR

Viktor

Chris Freeman
Chris Freeman
68,469 Points

How are [] and {} not working well?