I have two lists:
names = ['some_name', 'other_name']
status = ['queued', 'in-progress']
how can I join them to look like this:
list = ['some_name queued', 'other_name in-progress']
I have two lists:
names = ['some_name', 'other_name']
status = ['queued', 'in-progress']
how can I join them to look like this:
list = ['some_name queued', 'other_name in-progress']
Here is one way:
names = ['some_name', 'other_name']
status = ['queued', 'in-progress']
result = ['{} {}'.format(name, status) for name, status in zip(names, status)]
print(result)
Output:
['some_name queued', 'other_name in-progress']