Advertisement
franbricchi

Untitled

Apr 17th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. def repeticionesLetra(palabra, chequeadas):
  2.     return sum([1 for p in palabra if p in chequeadas])         #Esto se escribe como
  3.  
  4. def repeticionesLetra(palabra, chequeadas):
  5.     suma = 0
  6.     for p in palabra:
  7.         if p in chequeadas:
  8.             suma += 1
  9.     return suma
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement