Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
373 B
2
Indexable
Never
def add_lists_index_wise(list1, list2):
    combined = zip(list1, list2)
    result = []
    for items in combined:
        result.append(''.join(items))
    result.extend(list1[len(list2):])
    result.extend(list2[len(list1):])
    
    return result


list1 = ["M", "na", "i", "may"]
list2 = ["y", "me", "s", "ukh"]
print(add_lists_index_wise(list1, list2))
Leave a Comment