kyu_5.valid_parentheses package¶
Submodules¶
kyu_5.valid_parentheses.test_valid_parentheses module¶
-
class
kyu_5.valid_parentheses.test_valid_parentheses.
ValidParenthesesTestCase
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Testing valid_parentheses function
-
test_valid_parentheses
()[source]¶ Test the function called that takes a string of parentheses, and determines if the order of the parentheses is valid. The function should return true if the string is valid, and false if it’s invalid.
Examples
“()” => true “)(()))” => false “(” => false “(())((()())())” => true :return:
-
kyu_5.valid_parentheses.valid_parentheses module¶
-
kyu_5.valid_parentheses.valid_parentheses.
clean_up_string
(string: str) → str[source]¶ Cleaning up string from invalid chars :param string: :return:
-
kyu_5.valid_parentheses.valid_parentheses.
valid_parentheses
(string: str) → bool[source]¶ A function called that takes a string of parentheses, and determines if the order of the parentheses is valid. The function should return true if the string is valid, and false if it’s invalid. :param string: :return: