Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pickle
- class Computador:
- def __init__(self, marca):
- self.marca = marca
- def encender(self):
- pass
- def apagar(self):
- pass
- def obtener_marca(self):
- return self.marca
- archivo = open('computador.pickle', 'wb')
- laptop = Computador('Asus')
- pickle.dump(laptop, archivo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement