I need some help with a fuction. I have multiple lists called 'info' that are displayed as follows in a single textfile:
[['a', 'b', 'c'],['d1','e2','f2'],['g','h','i']]
[['test', 'test1', 'test2']['test3', 'test4', 'test5']['test6', 'test7', 'test8']]
I am trying to write a function that changes all triplets into one string and then loops through all the triples in the list to change them. Output should be:
['a b c','d1 e2 f2','g h i']
['test test1 test2','test3 test4 test5','test6 test7 test8']
I am trying things such as:
def short(x)
if len(x) == 3
' ' .join(x)
And then I have to do something to loop trough the list and check the parameters. I've been trying things such as:
def check (y)
param=info[0]
short(param)
and trying with for statements
But I'm getting nowhere...
Provided answer does not help at all. It just shows the same things that I've been trying