Sobes.tech
Senior

# Tehát, a "mit és hogyan kellene ezt a kódot csinálnia" követelményeknek a jelenlegi működés szerint kell elfogadni. db = Model() def processa(adatok): print("fájlméret: " + str(len(adatok))) felhasználói_sorok = open("/opt/data/users.txt").read().splitlines() eredmeny = [] for sor in felhasználói_sorok: tranzakcio_sorok = open("/opt/data/transactions.txt").read().splitlines() processa(tranzakcio_sorok) for sor2 in tranzakcio_sorok: reszek = sor2.split() ervenyes = db.check_transaction( user_id=reszek[3], change=reszek[4], ) if not re.search("\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}\s+\d+\s+\w+\s+\d+.\d+", sor2): continue user_id = sor.split()[0] regdate = db.get_regdate(user_id) if re.search("\d{4}-\d{2}-\d{2}", regdate) and re.search("\d+.\d+", reszek[4]): eredmeny.append(sor2) if len(eredmeny) > 0: print("illeszkedik")