0

Python programming question.

Write a function matched(s) that takes as input a string s and checks if the brackets "(" and ")" in s are matched: that is, every "(" has a matching ")" after it and every ")" has a matching "(" before it. Your function should ignore all other symbols that appear in s. Your function should return True if s has matched brackets and False if it does not.

22nd Aug 2019, 3:13 PM
Ayan Das
Ayan Das - avatar
1 Respuesta
0
Try it yourself, post ur code and people will gladly help.
22nd Aug 2019, 3:24 PM
Thoq!
Thoq! - avatar