“bucle anidado” Código de respuesta

bucle anidado

for a in range(1,3):
    if a%2!=0:
        print(a,end=" ")
        
    for b in range(1,a+1):
        if b%5==0:
         print(b,end=" ")
         
        for c in range(a,b+1):
            if c%3!=0:
             print(c,end=" ")

    print() 
Gr@Y_orphan_ViLL@in##

bucle anidado

def something(a):
    for methodname in ['method1', 'method2', 'method3']:
        try:
            m = getattr(a, methodname)
        except AttributeError:
            pass
        else:
            return m()
    raise AttributeError
SmilingG

Respuestas similares a “bucle anidado”

Preguntas similares a “bucle anidado”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código