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
Daniel Bishop
1,672 PointsPython Help
Hey, I am trying to do some Python on my own outside of the tracks (I am only half way through!)
I thought I would make a reminders app, like the shopping list but the format of the print is not working how I tried to aim for. I have compared it to the shopping list app I made as part of the track and can't spot what's wrong. Below is my code and also the result.
Here is my code:
Reminders App
Make list to contain reminders
reminders = []
Print Help Info
print("Reminders App") print("To end type 'END'")
Add new Items to the list
while True: new_item = input("Add Reminder: ")
# End List
if new_item == 'END':
break
reminders.append(new_item)
Display current list
print("Here are your reminders") for item in reminders: print(reminders)
And here is the result:
Reminders App
To end type 'END'
Add Reminder: Call Mum
Add Reminder: Go to the shops
Add Reminder: END
Here are your reminders
['Call Mum', 'Go to the shops']
['Call Mum', 'Go to the shops']
1 Answer
William Harrison
9,585 PointsI think what you are looking for on your print statement is:
print("Here are your reminders")
for item in reminders:
print(item)
As it is now you are printing the entire list for every item in the list.
Daniel Bishop
1,672 PointsThank you!
Daniel Bishop
1,672 PointsDaniel Bishop
1,672 PointsSorry, the format of that question came out strange! Apologies in advance! :)