Oct-01-2019, 12:17 PM
I think I misunderstood the assignment a bit. I was thinking given the user entering 'spam' three times, the
In that case you want to do three things when newWord is empty: add 'and ' to the start of newWord, append newWord to listToPrint, and break.
If you want the list to print at the end, you need to move (or copy) line 2 to the end of the program.
['spam', 'spam', 'and', 'spam']
. But I guess the goal is actually ['spam', 'spam', 'and spam']
.In that case you want to do three things when newWord is empty: add 'and ' to the start of newWord, append newWord to listToPrint, and break.
If you want the list to print at the end, you need to move (or copy) line 2 to the end of the program.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures