import pickle
class player :
def __init__(self, name , level ):
self.name = name
self.level = level
def itiz(self):
print("ur name is {} and ur lvl{}".format(self.name,self.level))
p = player("bob",12)
with open("Player.txt","w") as fichier :
record = pickle.Pickler(fichier)
record.dump(p)
这是错误 write() 参数必须是 str,而不是 bytes
牛魔王的故事
守着一只汪
30秒到达战场
相关分类