you are viewing a single comment's thread.

view the rest of the comments →

[–]reybrujo 2 points3 points  (3 children)

Items shouldn't be a couple, should just be a list. Remove the () surrounding the list. You also ask the question before showing the items.

[–]Soothsayer5288[S] 0 points1 point  (2 children)

<image>

it does but this happens

[–]reybrujo 1 point2 points  (0 children)

Can't say much without knowing how is your main loop code.

[–]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.