kyu_5.valid_parentheses package
Submodules
kyu_5.valid_parentheses.test_valid_parentheses module
Test for -> Valid Parentheses.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- class kyu_5.valid_parentheses.test_valid_parentheses.ValidParenthesesTestCase(methodName='runTest')[source]
Bases:
TestCaseTesting valid_parentheses function.
- _classSetupFailed = False
- _class_cleanups = []
- test_valid_parentheses = None
- test_valid_parentheses_0__(**kw)
Testing valid_parentheses with various test data [with test_input=’ (’, expected=False].
Test the valid_parentheses function 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. :return:
- test_valid_parentheses_1__test(**kw)
Testing valid_parentheses with various test data [with test_input=’)test’, expected=False].
Test the valid_parentheses function 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. :return:
- test_valid_parentheses_2_(**kw)
Testing valid_parentheses with various test data [with test_input=’’, expected=True].
Test the valid_parentheses function 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. :return:
- test_valid_parentheses_3_hi_(**kw)
Testing valid_parentheses with various test data [with test_input=’hi())(’, expected=False].
Test the valid_parentheses function 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. :return:
- test_valid_parentheses_4_hi_hi_(**kw)
Testing valid_parentheses with various test data [with test_input=’hi(hi)()’, expected=True].
Test the valid_parentheses function 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. :return:
- test_valid_parentheses_5__(**kw)
Testing valid_parentheses with various test data [with test_input=’()’, expected=True].
Test the valid_parentheses function 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. :return:
- test_valid_parentheses_6__(**kw)
Testing valid_parentheses with various test data [with test_input=’)(()))’, expected=False].
Test the valid_parentheses function 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. :return:
- test_valid_parentheses_7__(**kw)
Testing valid_parentheses with various test data [with test_input=’(’, expected=False].
Test the valid_parentheses function 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. :return:
- test_valid_parentheses_8__(**kw)
Testing valid_parentheses with various test data [with test_input=’(())((()())())’, expected=True].
Test the valid_parentheses function 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. :return:
kyu_5.valid_parentheses.valid_parentheses module
Solution for -> Valid Parentheses.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- kyu_5.valid_parentheses.valid_parentheses.clean_up_string(string: str) str[source]
Clean up string from invalid chars.
- Parameters:
string – str
- Returns:
str
- kyu_5.valid_parentheses.valid_parentheses.valid_parentheses(string: str) bool[source]
valid_parentheses function.
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: str :return: bool
Module contents
Valid Parentheses.