Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/geekcomputers/Python
/ is_same
Function
is_same
balance_parenthesis.py:21–29 ·
view source on GitHub ↗
(p1, p2)
Source
from the content-addressed store, hash-verified
19
20
21
def
is_same(p1, p2):
22
if
p1 ==
"("
and p2 ==
")"
:
23
return
True
24
elif
p1 ==
"["
and p2 ==
"]"
:
25
return
True
26
elif
p1 ==
"{"
and p2 ==
"}"
:
27
return
True
28
else
:
29
return
False
30
31
32
def
is_balanced(check_string):
Callers
1
is_balanced
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected