can anyone help me out , am getting an error in my code
a = [4,5,5,4] def remove_duplicates(num): b = num l =  j = 1 for i in b: if i not in b: continue else: l.append(i) b.remove(i) return l print remove_duplicates(a)
Error is Oops, try again. Your remove_duplicates modifies the list that was passed to it. [4, 5, 5, 4] was modified to [5, 4]. Perhaps you should make a copy first!
but am getting the exact output in the console