Intermedio
4 ottobre 2026Trova il bug: Data Engineering
Uno snippet di codice. Trova il bug, o dimostra che non ce n'è.
python
1def read_error_lines(filepath: str):
2 f = open(filepath, "r")
3 for line in f:
4 if line.startswith("ERROR"):
5 yield line.strip()
6
7def first_ten_errors(filepath: str) -> list:
8 errors = []
9 for line in read_error_lines(filepath):
10 errors.append(line)
11 if len(errors) == 10:
12 break
13 return errorsClicca sulle righe che causano il problema.
Il tuo verdetto
Un tentativo al giorno. La risposta appare subito dopo.
Mantieni la tua serie
Crea un account per conservare la tua serie e seguire i tuoi progressi.