Created
January 11, 2021 15:31
-
-
Save ali2236/b9843c7d990ff463b067e3b006993e33 to your computer and use it in GitHub Desktop.
Quera problem solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = list(input()) | |
stk = [] | |
for c in s: | |
if c == '=': | |
if stk: | |
stk.pop() | |
else: | |
stk.append(c) | |
print(''.join(stk)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment