Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created December 26, 2019 22:53
Show Gist options
  • Save Fhernd/561a34335f83a22be28d57227f448e5e to your computer and use it in GitHub Desktop.
Save Fhernd/561a34335f83a22be28d57227f448e5e to your computer and use it in GitHub Desktop.
# Ejercicio 440: Crear un conjunto utilizando la literal de conjunto y la clase set.
# Ejercicio 440: Crear un conjunto utilizando la literal de conjunto y la clase set.
# Literal de conjunto:
conjunto_literal = {0, 1, 2, 2, 3, 4, 5, 5, 5, 5, 5}
print(type(conjunto_literal))
print(len(conjunto_literal))
print(conjunto_literal)
print()
# Clase set:
conjunto = set((0, 1, 2, 2, 3, 4, 5, 5, 5, 5, 5))
print(type(conjunto))
print(len(conjunto))
print(conjunto)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment