运行python脚本时出错

时间:2018-04-20 15:36:52

标签: python python-2.x

我正在运行下面的python脚本。

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)

我收到以下错误。请帮忙。

/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

0 个答案:

没有答案