Write Python3 code to demonstrate conversion of list of tuple to list of list using map() + join()


Topic: Write Python3 code to demonstrate conversion of list of tuple to list of list using map() + join()

Solution

test_list = [('G', 'E', 'E', 'K', 'S'), ('F', 'O', 'R'), 
                            ('G', 'E', 'E', 'K', 'S')] 
print ("The original list is : " + str(test_list)) 
res = list(map(''.join, test_list)) 
print ("The list after conversion to list of string : " + str(res)) 



List all Python Programs