How to solve syntax error in Python: unexpected EOF while parsing

This is my code

salary = input("Please enter your salary at: ")
things = [["iphone","5000"],["mac pro","12000"],["coffee","31"],["book","81"],["bike","800"]]
while True :

Error type is

File “C:/Users/googol/PycharmProjects/untitled/ shopping.py “, line 5

^
SyntaxError: unexpected EOF while parsing
Process finished with exit code 1

Solution: because the code I wrote constitutes an infinite loop, so the error, the solution is to add the end condition

Similar Posts: