Created
December 26, 2019 22:53
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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