Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

256
Vistas
What's the equivalent in python for javascript's every()?

I have this code i'm translating from js to python and i have this:

if( this.risultato.every((v, i) => v === this.atteso[i]) ){}

whats the equivalent in python for the every(); function and if it's not builtin how do i create a similar function? For the arrow function part i came onto this solution:

lambda v, i: v == self.atteso[i]
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

the equivalent in python is all function:

mylist = [True, True, True]
x = all(mylist)

Or:

def all(iterable):
    for element in iterable:
        if not element:
            return False
    return True
about 4 years ago · Juan Pablo Isaza Denunciar

0

if all(self.risultato[i] == self.atteso[i] for i in len(self.risultato)):

seems like a direct translation. Or,

if all( i==j for (i,j) in zip(self.risultato, self.atteso)):
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda