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

Lloyd Harris
Lloyd Harris
3,939 Points

Iterate How am I supposed to create a bulleted list while iterating?

books = [ "Learning Python: Powerful Object-Oriented Programming - Mark Lutz", "Automate the Boring Stuff with Python: Practical Programming for Total Beginners - Al Sweigart", "Python for Data Analysis - Wes McKinney", "Fluent Python: Clear, Concise, and Effective Programming - Luciano Ramalho", "Python for Kids: A Playful Introduction To Programming - Jason R. Briggs", "Hello Web App: Learn How to Build a Web App - Tracy Osborn", ]

print("Suggested Gift: {}".format(books[0]))

print("Books:") for book in books: print("* " + book)

2 Answers

I don’t know to which challnage u are referring but i hope i can help: to iterate over a list, let’s say u have a list of books then;

for book in books: print(“* “. + book);

Lloyd Harris
Lloyd Harris
3,939 Points

I apologize, I just realized my issue was the file not saving before it was run. I appreciate your help and responsiveness.

no problem i couldn’t format the code because i’m on the phone. ask whatever u need anytime