Created
February 5, 2018 12:04
-
-
Save Fhernd/5b7163eddd8447702b35482a914b77db to your computer and use it in GitHub Desktop.
Cambiar el estado de un objeto en Python.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Libro: | |
def __init__(self, codigo): | |
self.codigo = codigo | |
self.autor = '' | |
self.titulo = '' | |
memoriasSubsuelo = Libro(452) | |
memoriasSubsuelo.autor = 'Fyodor Dostoevsky' | |
memoriasSubsuelo.titulo = 'Memorias del subsuelo' | |
print(memoriasSubsuelo.autor) | |
print(memoriasSubsuelo.titulo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment