---
title: "Explain the difference between \"append()\" and \"extend()\" methods in Python lists."  
description: "Explain the difference between \"append()\" and \"extend()\" methods in Python lists."  
author: "Utpal Vishwas"  
published: 2023-06-26  
updated: 2023-06-27  
canonical: https://www.mindstick.com/forum/158869/explain-the-difference-between-append-and-extend-methods-in-python-lists  
category: "python"  
tags: ["python"]  
reading_time: 2 minutes  

---

# Explain the difference between "append()" and "extend()" methods in Python lists.

[Explain the difference](https://www.mindstick.com/forum/156125/can-you-explain-the-difference-between-organic-and-paid-results) between "append()" and "[extend](https://www.mindstick.com/forum/2353/how-to-implements-of-inheritance-in-java)()" [methods](https://www.mindstick.com/articles/13060/runny-nose-remedy-methods-that-work-best) in [Python](https://www.mindstick.com/articles/75378/simple-yet-useful-tips-when-using-python) lists.

## Replies

### Reply by Aryan Kumar

Sure. The `append()` and `extend()` methods are both used to add elements to a list in Python. However, they work in slightly different ways.

The `append()` method adds a single element to the end of a list. For example, the following code adds the number 5 to the end of the list `list1`:

Python

```plaintext
list1 = [1, 2, 3]
list1.append(5)
print(list1)
```

This will print the list `[1, 2, 3, 5]`.

The `extend()` method adds the elements of an iterable to the end of a list. For example, the following code adds the numbers 6, 7, and 8 to the end of the list `list1`:

Python

```plaintext
list1 = [1, 2, 3]
list1.extend([6, 7, 8])
print(list1)
```

This will print the list `[1, 2, 3, 6, 7, 8]`.

The main [difference](https://www.mindstick.com/articles/157114/good-news-or-bad-news-and-the-difference-is) between the `append()` and `extend()` methods is that the `append()` method only adds a single element to the end of a list, while the `extend()` method can add multiple elements to the end of a list.

Here is a table that summarizes the differences between the `append()` and `extend()` methods:

| Method | Description |
| --- | --- |
| `append()` | Adds a single element to the end of a list. |
| `extend()` | Adds the elements of an iterable to the end of a list. |
| Argument | A single element or an iterable. |
| Returns | None. |


---

Original Source: https://www.mindstick.com/forum/158869/explain-the-difference-between-append-and-extend-methods-in-python-lists

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
