class course:
    def __init__(self, name, duration, link):
        self.name = name
        self.duration = duration
        self.link = link

    def __repr__(self):
        return f"{self.name}, [{self.duration} horas], ({self.link})"


courses = [
    course("Introduccion Linux", 15, "https://hack4u.io/cursos/introduccion-a-linux/"),
    course("Personalizacion Entorno", 3, "https://hack4u.io/cursos/personalizacion-de-entorno-en-linux/"),
    course("Introduccion Hacking", 53, "https://hack4u.io/cursos/introduccion-al-hacking/"),
]

def list_courses():
    for course in courses:
        print(course)

def name_courses(name):
    for course in courses:
        if course.name == name:
            return course

    return None
