I have a question, I have a character list similar to this:
letras_lista = ['gcjcf', 'afadd', 'ibfah', 'ihdha', 'cdigc', 'kaaci', 'ihiga', 'jbjji', 'hbjjj', 'bcdjg', 'ieika']
And I have a two character input like this:
orden = 'ah'
For this I created this code:
cont = 0
for i in letras_lista:#lista que puse de ejemplo
lista = [i]
for x in lista:
if orden in x:#patron a comparar
cont +=1
print(cont)
Could you tell me if there is a way to optimize the code, I am new to programming and I don't know many ways to do it. Beforehand thank you very much