0 out of 464 challenges solved
Write a Python function `bitwise_xor` that takes two tuples of integers as input and returns a new tuple where each element is the result of the bitwise XOR operation between the corresponding elements of the input tuples. #### Function Signature ```python [main.nopy] def bitwise_xor(tuple1: tuple, tuple2: tuple) -> tuple: ``` #### Input - `tuple1`: A tuple of integers. - `tuple2`: A tuple of integers of the same length as `tuple1`. #### Output - A tuple of integers where each element is the result of the bitwise XOR operation between the corresponding elements of `tuple1` and `tuple2`. #### Example ```python [main.nopy] bitwise_xor((10, 4, 6, 9), (5, 2, 3, 3)) # Output: (15, 6, 5, 10) bitwise_xor((11, 5, 7, 10), (6, 3, 4, 4)) # Output: (13, 6, 3, 14) ```
def bitwise_xor(tuple1: tuple, tuple2: tuple) -> tuple: """ Perform bitwise XOR operation between corresponding elements of two tuples. Args: tuple1 (tuple): The first tuple of integers. tuple2 (tuple): The second tuple of integers. Returns: tuple: A tuple containing the XOR results. """ # Replace the following line with your implementation pass