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

Ian Crook
Ian Crook
974 Points

I've having a hard time opening files in Workspaces, when I run "python filename.py" nothing happens.

I have been following along with the tutorials and entering the code into Workspaces. But when i go to the console to run it nothing happens.

greeting_list.py
full_name = "Ian Crook"
name_list = (full_name.split)

1 Answer

Ryan Ruscett
Ryan Ruscett
23,309 Points

Not sure about the workspace, but your code isn't right. So that would cause an issue.

full_name = "Ian Crook"
name_list = full_name.split()

You almost had it, you don't put the () around the entire thing. Split is a function so we call it like in the example above.

Does this help answer your question? Thanks!