nested loop does not return any value – low level

Advertisements alumnos = ["Pepe", "Juan", "Margarita", "Ariana"] notas = [99, 99, 99, 80] def pregunta_3(alumnos, notas): result = [] i = 0 while i < len(alumnos): alumno = alumnos[i] contador = notas.count(alumno) if contador > 2: result.append(alumno) i += 1 return result resultado = pregunta_3(alumnos, notas) print("Resultado de la pregunta 3:", resultado) I don’t know… Read More nested loop does not return any value – low level

How Can I Use Nested Loops on Pyhton

Advertisements I saw an example about using nested loop in pyhton. students = [[‘Igor’, ‘Sokolov’], [‘Riko’, ‘Miyazaki’], [‘Tuva’, ‘Johansen’]] for student in students: for name in student: print(name) print() I want to use same thing below: def id_validator(verified_ids,feedback_ids): for ids in id_validator: for x in ids: print(x) id_validator([5, 8], [5,8,30,50]) I expected to see 5… Read More How Can I Use Nested Loops on Pyhton