0

[SOLVED] What's wrong with this?

At python data stuctures course at the last input there is an error The name of the coach code is "Parenthesses Balance" inp = input() if inp.count("(") is inp.count(")"): print(True) else: print(False)

1st Mar 2021, 4:57 AM
Sadra Shakouri
Sadra Shakouri - avatar
3 Respostas
+ 4
You code is incorrect.... This question try to stack..... (First in last out)Method
1st Mar 2021, 5:06 AM
Naveen Rathore
Naveen Rathore - avatar
+ 1
Mohammad Sadra Shakouri Is this balanced according to your logic? (12+(77+23)+)+)+77+( I hope you will understand what to do now. You have to use Push and Pop technique.
1st Mar 2021, 5:29 AM
A͢J
A͢J - avatar
0
I Am AJ ! I foumd my error and fixed a minute ago
1st Mar 2021, 5:32 AM
Sadra Shakouri
Sadra Shakouri - avatar