我是 python 新手,有没有办法修改这个代码,我可以用键盘输入电影和他们的评分,并将它附加到表中的行?
from prettytable import PrettyTable
x = PrettyTable(["Moive Title", "Ratings"])
x.padding_width = 1 # One space between column edges and contents (default)
x.add_row(["Inception", "5 Stars"])
x.add_row(["Training Day","5 Stars"])
x.add_row(["Boyhood", "3 Stars"])
x.add_row(["Interstellar", "4.5 Stars"])
print x