with open(r'商品资料','r',encoding='utf-8') as f1: lis_goods = eval(f1.read()) # 用eval似乎会执行结果一次性返回,结果显示的是一行print(lis_goods)