I don't know a lot about python so please be patient with me:
Let's say we have a tuple that has this form:
locations = [('John' , 32 , 21) , ('Michael' , 23 , 12)]
How can I concatenate them to a string that looks like
"John 32 21
Michael 23 12"
I tried doing this:
str1 = '\n'.join( ' '.join(elem[0] elem [1] elem[2]) for elem in locations)
But I get an error at the elem[0],[1],[2] saying Invalid Syntax
Any ideas on how I can fix this?