Skip to content

Instantly share code, notes, and snippets.

@ali2236
Created January 11, 2021 15:31
Show Gist options
  • Save ali2236/b9843c7d990ff463b067e3b006993e33 to your computer and use it in GitHub Desktop.
Save ali2236/b9843c7d990ff463b067e3b006993e33 to your computer and use it in GitHub Desktop.
Quera problem solution
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