(Answering the title, because the rest did not understand anything, please edit and improve the question)
Starting from a list, we can concatenate its values in several ways like:
lista = ['o','l','a']
string = ''.join(lista)
string = ''.join([x for x in lista])
string = ''.join(map(lambda x: x, lista))
def concatena(lista):
string = ''
for x in lista:
string += x
return string
string = concatena(lista)
>>> print(string)
ola
And we can even modify it if necessary:
string = ''.join([x.upper() for x in lista]) #ou .lower()
Complicating a little but not much, we can play with arrays. Now just get the matrix lists and apply a method above.
matriz = [['o'],['l'],['a']]
#string = ''.join(map(lambda lista: Algum_metodo_acima, matriz))
#string = ''.join([Algum_metodo_acima for lista in matriz])
string = ''.join(map(lambda lista: ''.join(lista), matriz))
string = ''.join([''.join(lista) for lista in matriz])
def concatena_matriz(matriz):
string = ''
for lista in matriz:
for x in lista:
string += x
return string
string = concatena_matriz(matriz)
>>> print(string)
ola