pai, lucrez in pycharm de 3 ani deci... mi-e foarte usor si astfel :)
ionelmc
si ce rezultat produce exemplul tau?
PyGirl
imi returneaza trei obiecte de tipul Element <PmtInf>
ionelmc: dar apoi, ar trebui sa compar cumva fiecare nod din fiecare pmtinf, sa vad daca difera unul dintre ele, iar daca difera, sa fac remove la tot nodul si sa adaug tagul <cdtr..> la <pmtinf> initial
teoretic in momentul in care nu indeplineste conditia, ar trebui ca elementul respectiv sa nu fie sters:) in momentul de fata lista mea initiala arata cam asa:
[[<Element 'things' at 0x0133B1E0>, <Element 'things' at 0x0133B210>, <Element 'CdtTrfTxInf' at 0x0133B240>], [<Element 'things' at 0x0133B420>, <Element 'things' at 0x0133B450>, <Element 'CdtTrfTxInf' at 0x0133B480>], [<Element 'things' at 0x0133B630>, <Element 'things' at 0x0133B660>, <Element 'CdtTrfTxInf' at 0x0133B690>]]
iar rezultatul actual:
[[<Element 'things' at 0x0133B1E0>, <Element 'things' at 0x0133B210>, <Element 'CdtTrfTxInf' at 0x0133B240>, <Element 'CdtTrfTxInf' at 0x0133B480>, <Element 'CdtTrfTxInf' at 0x0133B480>]]
insa rezultatul ar trebui sa fie:
[[<Element 'things' at 0x0165B1E0>, <Element 'things' at 0x0165B210>, <Element 'CdtTrfTxInf' at 0x0165B240>, <Element 'CdtTrfTxInf' at 0x0165B480>], [<Element 'things' at 0x0165B420>, <Element 'things' at 0x0165B450>, <Element 'CdtTrfTxInf' at 0x0165B480>], [<Element 'things' at 0x0165B630>, <Element 'things' at 0x0165B660>, <Element 'CdtTrfTxInf' at 0x0165B690>]]
ionelmc
uita-te la „root”
PyGirl
stai, ultima lista e gresita :)
ar trebui sa am o lista de doua liste
ce sa vad la root ?
ionelmc
pai uita-te la elementul parinte
print ala poti sa vezi tot arborele de elemente
variabila aia „nodes„ nu are nici o treaba cu ce vrei tu