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 (2015) Python Data Types Use .split() and .join()

slow going, please help with task 3

hi I am stuck on task 3 any suggestions?

thank you

Kim

banana.py
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are:"+', '.join(display_menu)
display_menu: ', '.join(sundaes)

2 Answers

Ben Reynolds
Ben Reynolds
35,170 Points
  1. Move the line with the display_menu variable above the line with the menu variable (currently the menu variable is trying to access the display_menu variable before it exists)

  2. You'll need to use the format() method on the line where you declare the menu variable.

Hope this helps, if you're still stuck post the latest version of your code and we'll go from there!

Hi Ben,

Thanks for your help I have tried the suggestions you made still no luck am I writing the format method correctly?

Ben Reynolds
Ben Reynolds
35,170 Points

I'll need to see what you've tried since then, can you share the latest version of your code?