Oct-29-2017, 06:09 PM
Hello Team,
I am currently taking a course on skillshare for Python. I am following along, but one example I keep get unexpected indent error.
This is the code I have:
in_stock = ["blue pens", "paper", "staples"] shopping_cart = ["blue pens", "paper", "staples", "orange post-its"] for item in shopping_cart: if item in_stock: print("Adding " + item + " to your order.") else: print("Sorry " + item + " is not in stock.")I do not quite understand what the issue is as if and else are indented 4 spaces. print is indented a total of 8 spaces.
Anyone know what im doing wrong?