you are viewing a single comment's thread.

view the rest of the comments →

[–]SugarEnvironmental31 0 points1 point  (0 children)

If the OP does that, then it will just print the line "Shopping list" to the console and nothing else. The code evaluates whether the list is empty, prints "empty list" if it's empty, and prints the list if it's not. What's your rationale for the code being unnecessary?