Skip to content

Instantly share code, notes, and snippets.

@robintux
Created July 7, 2023 13:38
Show Gist options
  • Save robintux/6f65cf1aedd90242d319b04e056381c3 to your computer and use it in GitHub Desktop.
Save robintux/6f65cf1aedd90242d319b04e056381c3 to your computer and use it in GitHub Desktop.
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