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 and Strings

this question does not make any sense!!!!

my code is this, according to requirements!!

full_name = ("Jack Johnson") name_list = full_name.split()

the output is:

['Jack', 'Johnson']

so it is an list type and split on the space!

2 Answers

luke hammer
luke hammer
25,513 Points

what is your question can you please restate using a "?"

Hi Bruno

yes by default if you call the split() method on a string it creates a list by splitting it on the space. You can also split on different delimiters. the code below will split on the ','

test="Hello,There".split(',')
["Hello","There"]

the above example create a list by splitting on the ','