maths/permutations.py
def check(self):
        """
        Check if the current data represents a permutation
        :return: boolean
        """
        n = len(self.data)
        occurences = []
        i = 0
        try:
            while i < n:
                if self.data[i] not in occurences:
                    occurences.append(self.data[i])
                else:
                    return False
                i += 1

        except IndexError:
            return False

        return True

        Check if the current data represents a permutation
        :return: boolean
        
Check if the current data represents a permutation
Check if the current data represents a permutation
def check(self):
        n = len(self.data)
        occurences = []
        i = 0
        try:
            while i < n:
                if self.data[i] not in occurences:
                    occurences.append(self.data[i])
                else:
                    return False
                i += 1
        except IndexError:
            return False
        return True
def check ( self ) : n = len ( self . data ) occurences = [ ] i = 0 try : while i < n : if self . data [ i ] not in occurences : occurences . append ( self . data [ i ] ) else : return False i += 1 except IndexError : return False return True
Check if the current data represents a permutation
Check if the current data represents a permutation
"""
        Check if the current data represents a permutation
        :return: boolean
        """
None
self