python concatenate tuple to string

Solutions on MaxInterview for python concatenate tuple to string by the best coders in the world

showing results for - "python concatenate tuple to string"
Santino
14 Mar 2019
1# initializing the list with tuples
2string_tuples = [('A', 'B', 'C'), ('Tutorialspoint', 'is ', 'popular')]
3# function that converts tuple to string
4def join_tuple_string(strings_tuple) -> str:
5   return ' '.join(strings_tuple)
6# joining all the tuples
7result = map(join_tuple_string, string_tuples)
8
9# converting and printing the result
10print(list(result))		# ['A B C', 'Tutorialspoint is popular']