input: def check_balanced_parentheses(lst):
      '''
      You are provided with a list of two strings consisting solely of open
      parentheses '(' or close parentheses ')'.
      The task is to determine if it's possible to join the two strings in
      any sequence to form a valid string.
      A string S is valid if all the parentheses in S are balanced. For instance:
      the string '(())()' is valid, while '())' is not.
      Return 'Yes' if a valid string can be made, otherwise return 'No'.
  
      Examples:
      check_balanced_parentheses(['()(', ')']) == 'Yes'
      check_balanced_parentheses([')', ')']) == 'No'
      '''
output:     
      a, b = lst
      def is_valid(s):
          balance = 0
          for char in s:
              if char == '(':
                  balance += 1
              else:
                  balance -= 1
              if balance < 0:
                  return False
          return balance == 0
  
      return 'Yes' if is_valid(a + b) or is_valid(b + a) else 'No'
  