0

I am running the below python script.

Price = []
Item = input("Enter the price of each item and seperate each price by line. Enter the blank line once you entered all prices. ")
while Item != "":
    Item = input("")
    Price.append(Item)
print(Price)

And I am getting the below error. Please help.

/Users/piyush/PycharmProjects/Test1/venv/bin/python /Users/piyush/Desktop/LearningProgramming/Python/Exercises/Exercise3/3.64.py
Enter the price of each item and seperate each price by line. Enter the blank line once you entered all prices. 12
23
Traceback (most recent call last):
  File "/Users/piyush/Desktop/LearningProgramming/Python/Exercises/Exercise3/3.64.py", line 11, in <module>
    Item=input("")
  File "<string>", line 0

    ^
SyntaxError: unexpected EOF while parsing
Process finished with exit code 1
Barmar
  • 741,623
  • 53
  • 500
  • 612
Piyush
  • 61
  • 6

0 Answers0