PY
py
1
2
3
4
5
6
7
8
9
10
11
#this question was asked for Placement test
#write a code which take an equation like (a+b-(c+b)) and give output a+b-c+b
#that is remove brakets and make a simple expression. there ere many cases
# i tried but didnt work
x = input()
expr = x.split
if '(' or ')' in expr:
expr.remove(')')
expr.remove('(')
print(expr)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run