Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def remover_duplicados(secuencia):
- elementos_iterados = set()
- for elemento in secuencia:
- if elemento not in elementos_iterados:
- yield elemento
- elementos_iterados.add(elemento)
- lista = [3, 11, 19, 3, 5, 7, 21, 5, 29]
- print(list(remover_duplicados(lista)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement