3
This code snippet generates me the following output.
tamanho = len(lista_nome_base_docs)
print (tamanho)
lista_geral_de_lista_arquivos = []
for i in range(tamanho):
with open(lista_nome_base_docs[i],"r") as arquivo:
conteudo = arquivo.readlines()
lista_geral_de_lista_arquivos.append(conteudo)
print (lista_geral_de_lista_arquivos)
Exit:
[['Do mesmo modo, a consulta aos diversos militantes acarreta um processo de
reformulacao e modernizacao do fluxo de informacoes.'], ['Evidentemente, a
determinacao clara de objetivos promove a alavancagem dos niveis de
motivacao departamental.'], ['Gostaria de enfatizar que a percepcao das
dificuldades cumpre um papel essencial na formulacao das diretrizes de
desenvolvimento para o futuro.']]
that is a list list.. but in the internal list the sentence is inside a list position ['phrasing'] like I make her look this way ['sentence,'whole']
Would someone tell me some way to do this or scroll through this string within the list position...
It is the fourth question you open related to this subject. Wouldn’t it be easier for you to describe exactly what you need to do and we’ll help you through the whole process?
– Woss
@Andersoncarloswoss is because I’m doing a job.. and venturing into python.... and if I’m going to put the problem as a whole, I don’t think it would be a good idea, because each one would structure the problem differently, and my problem itself is not structuring the problem, but how to manipulate some structures, so I’m removing doubts in parts.
– William Henrique
Then just use the
split
to separate the phrase into words.– Woss
@Andersoncarloswoss it is.. that I already knew... the problem is how to do this by getting a list from inside another list... for example, I’m drafting this here:
for numbers in lista_geral_de_lista_arquivos:
 for number in numbers:
 conteudo_string = lista_geral_de_lista_arquivos[number].split()
 lista_palavras.append(conteudo_string)
but it hasn’t worked yet– William Henrique