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

Python Challenge

What is wrong with this code, or am I trying to write it in the console, not the editor.

greeting_list.py
full_name = 'Herbert Showalter'

name_list = [Herbert, Showalter]

name_list.split ()

2 Answers

Hi there,

The first quesion ask for Create a variable named full_name that holds your full name. That's as you have done:

full_name = "Steve Hunter"

Then, it asks Make another variable named name_list that holds your full name in list form, split on the spaces. Don't create name_list manually, use split!

So you call the split method on your full_name variable and assign that into the new variable, name_list:

full_name = "Steve Hunter"
name_list = full_name.split()

I hope that helps.

Steve.

elhadji kebe
elhadji kebe
7,853 Points

it should be: full_name = 'Herbert Showalter'

name_list = full_name.split()