def calculate_computation(computation, num, operation):             # O(1)
    """
    If values exist in array concatenate with operation, else return number

    >>> calculate_computation([], 42, '+')
    [42]
    >>> calculate_computation([112], 42, '^')
    [112, '^', 42]
    """
    if computation:                                                 # O(1)
        return computation + [operation, num]                       # O(1)
    return [num]                                                    # O(1)