There are two ways to add elements from list1 to list2, fone is concatenation with the plus operator and the second one is to add elements with extend method with the help of the below-given steps.
Method 1 : Using concatenation
Add elements:
Steps to solve the program
- Take two lists as inputs.
- Add them using the ” + ” operator.
- Print the final list.
Output :
Method 2 : Using extend()
Steps to solve the program
- Take two lists as input.
- Combine both lists using extend().
- Print the combined list.
Output :
Related Articles
Python program to calculate the sum of all elements from a list.
Python program to find a product of all elements from a given list.
Python program to find the minimum and maximum elements from the list.
Python program to differentiate even and odd elements from the given list.
Python program to remove all duplicate elements from the list.
Python program to print a combination of 2 elements from the list whose sum is 10.