Created
December 26, 2019 00:23
-
-
Save Fhernd/e2e1cb334f034028e228559cba6280a8 to your computer and use it in GitHub Desktop.
# Ejercicio 424: Contar el número de ocurrencias de un elemento en una tupla.
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 424: Contar el número de ocurrencias de un elemento en una tupla. | |
numeros = (2, 3, 2, 2, 5, 5, 3, 7, 11, 13, 13, 2, 19, 23) | |
print(numeros) | |
cantidad_dos = numeros.count(2) | |
print('El número 2 aparece {} veces.'.format(cantidad_dos)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment