For example, I have following two lists
listA=[\'one\', \'two\' , \'three\'] listB=[\'apple\',\'cherry\',\'watermelon\']
How can I pair those two lists to
Here what I got based on what you need (map and lambda),
Input:
listA=['one', 'two' , 'three'] listB=['apple','cherry','watermelon'] list(map(lambda x, y: x+ ' ' +y, listA, listB))
Output:
['one apple', 'two cherry', 'three watermelon']