(nums)
return res
:param nums: List[int]
    :return: Set[tuple]
:param nums: List[int]
    :return: Set[tuple]
: param nums : List [ int ] : return : Set [ tuple ]
def subsets(nums):
    """
    :param nums: List[int]
    :return: Set[tuple]
    """
    n = len(nums)
    total = 1 << n
    res = set()

    for i in range(total):
        subset = tuple(num for j, num in enumerate(nums) if i & 1 << j)
        res.add(subset)

    return res
def subsets ( nums ) : n = len ( nums ) total = 1 << n res = set ( ) for i in range ( total ) : subset = tuple ( num for j , num in enumerate ( nums ) if i & 1 << j ) res . add ( subset ) return res