Reverse an array without using the reverse method, without using a second array, and without duplicating any of the values.
Utilisateur anonyme
def reverseNoDuplication(s): m = len(s) for i in range(m - 1, -1, -1): if s[i] not in s[m:]: s.append(s[i]) return s[m:]