Created
July 7, 2023 13:38
-
-
Save robintux/6f65cf1aedd90242d319b04e056381c3 to your computer and use it in GitHub Desktop.
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 Perro: | |
# El método __init__ es llamado al crear el objeto | |
def __init__(self, nombre, raza): | |
print(f"Creando perro {nombre}, {raza}") | |
# Atributos de instancia | |
self.nombre = nombre | |
self.raza = raza | |
mi_perro = Perro("Toby", "Bulldog") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment