Unpack operation not allowed in this context
我的代码:
def save_data_to_database(self):
parsed_records = self.parse_sheet_data()
for record in parsed_records:
self.db.set_item(
"sheet", #table name
"id, number_of_order, cost, delivery_time" # These are fields in table
f"{*record}" # Here I'm trying to unpack values, but I can't
)
“parsed_记录”的值如下所示:
[['1', '1249708', '675', '24.05.2022'], ['2', '1182407', '214', '13.05.2022'], ['3', ...]]
若你们看到上面的代码,我想用“*”打开记录,但我不能。
我应该如何将记录保存到db?