I want to print individual items from a list like this:

You have a book, towel, shirt, pants in your luggage.

This is my code:

suitcase = ["book", "towel", "shirt", "pants"]
print ("You have a %s in your luggage." % suitcase)

Instead of printing out the items on the list, my code appends the
list to the string. How do I need to modify my code?

== RESTART: C:/Users/Rafael/Documents/01 - BIZ/Python/Python Code/PPC_7.py ==
You have a ['book', 'towel', 'shirt', 'pants'] in your luggage.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to