Difference between list append and list extend

If you want to add a list to another list, use the append method. To add elements of a list to another list, use the extend method.

The code above shows the difference between the two.

Link to the source code.

Scroll to Top

Work with Khuyen Tran

Work with Khuyen Tran