2425. Bitwise XOR of All Pairings

class Solution:
    def xorAllNums(self, num1: List[int], num2: List[int]) -> int:
        l1 = len(num1)
        l2 = len(num2)

        c1 = l1 % 2
        c2 = l2 % 2

        ans = 0
        x = []
        if c1:
            x += num2

        if c2:
            x += num1

        for e in x:
            ans ^= e

        return ans