
In Google Docs, a simple edit log can be represented as a string where lowercase letters mean typed characters and # means backspace. Write a function that returns the final text after processing the entire log.
This problem tests whether you can write clean, maintainable, and efficient code for a straightforward string-processing task.
log containing lowercase English letters and the # character.Example 1
log = "ab#c""ac"a, type b, backspace removes b, then type c.Example 2
log = "a##b#c""c"a is typed, two backspaces remove a and then do nothing, b is typed and removed, then c remains.1 <= len(log) <= 10^5log contains only lowercase English letters and #log = "ab#c"Output"ac"WhyThe `#` removes `b`, so the remaining text is `ac`.log = "a##b#c"Output"c"WhyThe first two backspaces remove `a` and then do nothing, `b` is added and removed, and `c` remains.log = "####"Output""WhyEvery backspace occurs on empty text, so the final result is an empty string.1 <= len(log) <= 10^5log contains only lowercase English letters and '#'A backspace on empty text has no effectdef normalize_edit_log(log):