We will take two lists as input & iterate all the elements one by one with the Python loop. Combine two list elements from both lists as a sublist with the help of the below-given steps.
Combine two list elements:
- Take two lists as input.
- combine both lists using zip().
- Add the combined elements to an empty list.
- Use for loop for this purpose.
- Print the list to see the output.
Output :
Related Articles
Python program to get keys and values from the list of dictionaries.
Python program to get all the unique numbers in the list.
Python program to convert a string into a list.
Python program to replace the last and the first number of the list with the word.
Python program to check whether the given element is exist in the list or not.
Python program to remove all odd index elements.