Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created December 26, 2019 21:32
Show Gist options
  • Save Fhernd/52af54815840e087bc7d80d4695be21f to your computer and use it in GitHub Desktop.
Save Fhernd/52af54815840e087bc7d80d4695be21f to your computer and use it in GitHub Desktop.
# Ejercicio 437: Remover las tuplas vacías desde una lista de tuplas.
# Ejercicio 437: Remover las tuplas vacías desde una lista de tuplas.
tuplas = [(1, 2), (5,), (), (9, 8, 7), (1,), (), ()]
print(tuplas)
print(len(tuplas))
print()
tuplas = [t for t in tuplas if t]
print(tuplas)
print(len(tuplas))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment