1
I am building a program that needs to know the files in its work directory. So I typed the following code.
def encontrar_arq(cadena, caminho):
encontrado = False
# lista_arq = ls(caminho) #funcao que lista todos os arquivos do caminho
for nome_arq in lista_arq:
if nome_arq == cadena:
encontrado = True
return encontrado
Thanks @stderr, I have other problems with my code, so I haven’t been able to run your solution. That’s why the implementation I did I haven’t been able to test it yet. But just by testing the answer value.
– Adolfo Correa
@Adolfocorrea Dispo, any questions just warn!
– stderr