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
Mangesh kadam
Courses Plus Student 348 PointsCan anyone explain this alpha_list=list('abcde')
Getting error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'list' object is not callable
1 Answer
Mangesh kadam
Courses Plus Student 348 PointsI am on list deletion tutorial But i thought he is typecasting string as list
Jeff Hartl
Python Web Development Techdegree Student 8,420 PointsJeff Hartl
Python Web Development Techdegree Student 8,420 PointsWhen I run your line:
alpha_list = list('abcde')I do not see an error.alpha_listwill look like this:['a', 'b', 'c', 'd', 'e']Each character from the string "abcde" was added to a list as a distinct item in the list.On the other hand, if you are trying to put the whole string "abcde" into a list without separating the individual characters, you can try calling the
.split()method on the string. Or, you could assign a variable to an empty list and then append the string "abcde" to it.Which exercise or challenge are you working on?