Quanlse/QHamiltonian.py
def allIn(listA: Union[int, List[int]], listB: Union[int, List[int]]) -> bool:
            """
            Check whether all the items in listB are in listA.

            :param listA: listA
            :param listB: listB
            :return: a bool value
            """
            if isinstance(listA, int):
                listA = [listA]
            if isinstance(listB, int):
                return listB in listA
            else:
                for item in listB:
                    if item not in listA:
                        return False
                return True

            Check whether all the items in listB are in listA.

            :param listA: listA
            :param listB: listB
            :return: a bool value
            
Check whether all the items in listB are in listA.
Check whether all the items in listB are in listA .
def allIn(listA: Union[int, List[int]], listB: Union[int, List[int]]) -> bool:
            if isinstance(listA, int):
                listA = [listA]
            if isinstance(listB, int):
                return listB in listA
            else:
                for item in listB:
                    if item not in listA:
                        return False
                return True
def allIn ( listA : Union [ int , List [ int ] ] , listB : Union [ int , List [ int ] ] ) -> bool : if isinstance ( listA , int ) : listA = [ listA ] if isinstance ( listB , int ) : return listB in listA else : for item in listB : if item not in listA : return False return True
Check whether all the items in listB are in listA.
Check whether all the items in listB are in listA .
"""
            Check whether all the items in listB are in listA.

            :param listA: listA
            :param listB: listB
            :return: a bool value
            """
a bool value
a bool value
listA
Union[int, List[int]]
None
listB
Union[int, List[int]]
None