728x90 Python #파이썬 #TIP1 728x90 Python / 파이썬 coding시 기억해둘만한 것들 최근에 Python으로 소소하게 업무에 필요한 tool을 만들면서 기억해둘법한 것들을 정리해야 겠다는 생각이 들었다. 물론 그때그때 검색해서 찾아도 되지만 쉽게 찾기가 어려웠다거나 나름 삽질을 했던 것들을 앞으로 여기에 하나씩 추가하면서 적어둘 예정... 1. etree로 xml 순회시 특정 태그의 특정 attrib에 해당하는 값을 찾은 후 그 태그의 자식태그를 순회하면서 값을 찾거나 해야 할때. using etree to search specific tag and its child traversal. import xml.etree.ElementTree as ET tree = ET.parse(file_path) tree_root = tree.getroot() for tag in tree_root.iter.. 2021. 10. 6. 이전 1 다음