标签:size 16px else cos sele print sel from opp
from db import db_handler
from interface import bank
def shopping_interface(name, cost, shoppingcart):
flag,msg = bank.consume_interface(name,cost)
if flag:
dic = db_handler.select(name)
dic[‘shoppingcart‘] = shoppingcart
db_handler.save(dic)
return True, ‘购买成功‘
else:
print(msg)
def check_shoppingcart(name):
dic = db_handler.select(name)
return dic[‘shoppingcart‘]
标签:size 16px else cos sele print sel from opp
原文地址:https://www.cnblogs.com/wangcheng9418/p/9221766.html