def check_if_balance(string):
    '''
    >>> check_if_balance('{[[(])}]')
    True
    >>> check_if_balance('{[[()}]')
    False
    >>> check_if_balance('')
    True
    '''
    table = Counter()
    for i in string:

        index = str(ord(i))[0]
        if '{[(' in i:
            table[index] += 1

        elif i in ')}]':
            table[index] -= 1

    for i in table.values():
        if i !=-0:
            return False
    return True
dataset/ETHPy150Open bt3gl/Python-and-Algorithms-and-Data-Structures/src/builtin_structures/balance_symbols.py/check_if_balance/swapped operands of `in`