diff --git a/calc_closing_tag_overhead.py b/calc_closing_tag_overhead.py new file mode 100644 index 0000000..42c87a9 --- /dev/null +++ b/calc_closing_tag_overhead.py @@ -0,0 +1,16 @@ +f = open("xml-sample-file.xml", "r") +s = f.read() + +l = 0 +idx = 0 +while True: + beg = s.find("", beg) + l += end - beg + 1 + idx = end + 1 + +f.close() + +print(f"{l}/{len(s)} ~= {int(l/len(s) * 100)}%") \ No newline at end of file