Function `valid_parentheses` has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. https://codeclimate.com/github/iKostanOrg/codewars/kyu_7/valid_parentheses/solution.py#issue_674bf1c4dee4be0001000a20
Function
valid_parentheseshas a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.https://codeclimate.com/github/iKostanOrg/codewars/kyu_7/valid_parentheses/solution.py#issue_674bf1c4dee4be0001000a20