How to Append Multiple Items to a List in Python Last Updated : 26 Nov, 2024 Comments Improve Suggest changes Like Article Like Report Appending multiple items to a list in Python can be achieved using several methods, depending on whether you want to extend the list with individual elements or nested collections. Let’s explore the various approaches.Using extend method (Adding multiple items from iterable)The list.extend() method adds multiple elements to the end of a list, expanding it with the contents of an iterable. The += operator functions similarly to extend(), concatenating the original list with the provided iterable. Python # Initializing a list a = [1, 2, 3] # Appending multiple items a.extend([4, 5, 6]) print(a) # Using += Operator b = [1, 2, 3] # Appending multiple items b += [4, 5, 6] print(b) extend() method is ideal for adding elements from another list or iterable without nesting. Assignment operator approach is concise and achieves the same result as extend().Using append method append() is the most simple method and can be used to add items one by one within a loop. Python # Initializing a list a = [1, 2, 3] b = [4, 5, 6] # Appending multiple items using a loop for i in b: a.append(i) print(a) Output[1, 2, 3, 4, 5, 6] This approach gives more control if you need to manipulate items before appending them.Using List Comprehension (By creating a new list)List comprehension can be used to create a new list by combining the existing list with additional items. Python # Initializing a list a = [1, 2, 3] # Appending multiple items using list comprehension a = [*a, 4, 5, 6] print(a) Output[1, 2, 3, 4, 5, 6] This approach is useful when you want to create a new list while keeping the original list intact. Comment More infoAdvertise with us Next Article How to Append Multiple Items to a List in Python A anuragtriarna Follow Improve Article Tags : Python Python Programs python-list Python list-programs Practice Tags : pythonpython-list Similar Reads Append Multiple items to List - Python Appending items to a list in Python is an essential and common operation when working with different data structures. Sometimes, we need to add more than one item to a list at a time and in this article, we will explore the various ways to append multiple items to a list at the same time.Using exten 2 min read How to Append Objects in a List in Python The simplest way to append an object in a list using append() method. This method adds an object to the end of the list. Pythona = [1, 2, 3] #Using append method to add object at the end a.append(4) print(a) Output[1, 2, 3, 4] Let's look into various other methods to append object in any list are:Ta 2 min read How To Combine Multiple Lists Into One List Python Combining multiple lists into a single list is a common operation in Python, and there are various approaches to achieve this task. In this article, we will see how to combine multiple lists into one list in Python. Combine Multiple Lists Into One List PythonBelow are some of the ways by which we ca 2 min read Python - Append Multiple elements in set In Python, sets are an unordered and mutable collection of data type what does not contains any duplicate elements. In this article, we will learn how to append multiple elements in the set at once. Example: Input: test_set = {6, 4, 2, 7, 9}, up_ele = [1, 5, 10]Output: {1, 2, 4, 5, 6, 7, 9, 10}Expla 4 min read Python - Append Multiple Lists at Once Our task is to merge multiple lists into a single list by appending all their elements. For example, if the input is a = [1, 2], b = [3, 4], and c = [5, 6], the output should be [1, 2, 3, 4, 5, 6].Using itertools.chain()itertools.chain() function from the itertools module is another way to combine l 4 min read Like