Re: [Tutor] tiny, little issue with list

2017-03-21 Thread Sri Kavi
Hi Rafael, LogActivities = [] prompt = ("What have you done today? Enter 'quit' to exit. ") while True: activity = input(prompt) # Do this here so 'quit' is not appended to the list if activity == 'quit': # To get out of the loop break # If still in the loop, append t

Re: [Tutor] tiny, little issue with list

2017-03-19 Thread Alan Gauld via Tutor
On 19/03/17 12:17, Rafael Knuth wrote: > LogActivities = [] > prompt = ("What have you done today? ") > prompt += ("Enter 'quit' to exit. ") I'm not sure why you put that on two lines but thats just a nit pick... > while True: This will loop forever unless you explicitly break, return or hit an

[Tutor] tiny, little issue with list

2017-03-19 Thread Rafael Knuth
LogActivities = [] prompt = ("What have you done today? ") prompt += ("Enter 'quit' to exit. ") while True: activity = input(prompt) LogActivities.append(activity) if activity == "quit": print("Let me recap. This is what you've done today: %s." % ", " .join(LogActivities)) Th