defRemove(duplicate):final=[]foriinrange(len(duplicate)):ifduplicate[i]notinduplicate[i+1:]:final.append(duplicate[i])returnfinalx=input("Enter the integers: ")x=x.split()print(Remove(x))
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This solution is in python
output
Hi, you could have use the
set
method, like this:dev.to/rafaacioly/comment/12l2j
:)
is
[3, 4, 6]
not
[4, 6, 3]
which is the expected answer
Fixed it