Generation

generate functionThu, 22 Dec 2022

Define a function that removes duplicates from an array of numbers and returns it as a result. The order of the sequence has to stay the same.

def distinct(seq): return list(set(seq))

Questions about programming?Chat with your personal AI assistant