Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
¿Cuál es el equivalente en python para javascript's every()?

Tengo este código que estoy traduciendo de js a python y tengo esto:

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

¿Cuál es el equivalente en python para every(); y si no está integrado, ¿cómo puedo crear una función similar? Para la parte de la función de flecha llegué a esta solución:

 lambda v, i: v == self.atteso[i]
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

el equivalente en python es all función:

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

O:

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

0

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

parece una traducción directa. O,

 if all( i==j for (i,j) in zip(self.risultato, self.atteso)):
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!