Python Python Basics (2015) Shopping List App Continue

How do you say stop if there's an a then continue printing the other items please explain and show your work

Thank you to anyone who is willing to help with question the video before it didn't explain THIS to well.
def loopy(items):
    if loopy 0= 'a':

1 Answer

Steven Parker
Steven Parker
171,327 Points

Perhaps a few hints might help:

  • "loopy" is the name of the function, you won't use it inside the function
  • as the name might imply, you will want to create a loop
  • a "for" type loop would help isolate one item at a time
  • when indexing, put the index value inside brackets []
  • nothing in the same block after a "continue" statement will ever be executed
  • be sure to print one item at a time and not all "items"