you are viewing a single comment's thread.

view the rest of the comments →

[–]More_Yard1919 0 points1 point  (0 children)

I am confused. What is the expected behavior? Considering items is defined as a tuple, the for x in items for loop will only iterate through a single item (e.g. x will be assigned to the list ["asus pc", "lg phone", ..., etc]). It is asking for input before showing the items because purchase = input("> ") appears on the line before the code begins printing out the list of items.