有没有大佬知道f'{username}.json'后面的.json是什么意思?在这里面起了一个什么作用啊? # 接收结果,并打印 user_dic = { 'username':username, 'password':password, 'balance':15000, 'flow':[], 'shop_car':{}, #locked查看账户是否被冻结 'locked':False } user_path = os.path.join( settings.USER_DATA_PATH,f'{username}.json' ) with open(user_path,'w',encoding='utf-8') as f: json.dump(user_dic,f,ensure_ascii=False)
2021-07-04
最新推荐文章于 2024-08-27 16:38:10 发布