Oct-01-2019, 02:28 AM
(Oct-01-2019, 01:12 AM)ichabod801 Wrote: You just need one line before the break line. On that line you want to insert 'and' between the last item and the next to last item in the list. There is an insert method of lists you can use to do this.
So I took your information and I think I may have gotten the code before the break, but it still doesn't print a list, it just keeps revolving back to "Enter a word to add to the list" and won't print anything.
listToPrint = [] print(listToPrint) while True: newWord = input("Enter a word to add to the list (press return to stop adding words) > ") if newWord == "": newWord.insert (', and') + [-2] break else: listToPrint.append(newWord)I don't know why I am struggling with this so much, the other problem was simple, this just seems to be confusing me more than anything.