Created
December 27, 2019 16:04
-
-
Save Fhernd/d0880a3d133e984fb344ed36e281dfbb to your computer and use it in GitHub Desktop.
# Ejercicio 456: Repetir un elemento cierta cantidad de veces con la clase Counter.
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 456: Repetir un elemento cierta cantidad de veces con la clase Counter. | |
from collections import Counter | |
contador = Counter(a=5, e=4, i=0, o=-1, u=2) | |
print(contador) | |
print() | |
elementos_repetidos = list(contador.elements()) | |
print(type(elementos_repetidos)) | |
print(elementos_repetidos) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment