Resolved: How to combine two lists by concatenating pairs of parallel elements? 0 By Isaac Tonny on 17/06/2022 Issue Share Facebook Twitter LinkedIn Question: I have two lists like this: list_a = ["Orange", "Kiwi", "Apple", "Orange"] list_b = ["sweet", "bitter", "nice", "good for skin"] How to concatenate the two lists to become like this: list_c = ["Orange", "sweet", "Kiwi", "bitter", "Apple", "nice", "Orange", "good for skin"] What I got is just adding the last element. Answer: Assuming both the lists have same length. list_a = ["Orange", "Kiwi", "Apple", "Orange"] list_b = ["sweet", "bitter", "nice", "good for skin"] list_c = [] for a, b in zip(list_a, list_b): list_c.append(a) list_c.append(b) print(list_c) Output: ['Orange', 'sweet', 'Kiwi', 'bitter', 'Apple', 'nice', 'Orange', 'good for skin'] If you have better answer, please add a comment about this, thank you! list python
Resolved: Is it possible to return the return from a lambda when using Api gateway with eventbridge?22/03/2023
Resolved: How applied a multiple textures images or one image into a cube in qt 6 with qml?22/03/2023