Handling Python lists: methods for adding and retrieving elements (and sorting, reversing, etc)

Published: 07 September 2023
on channel: PatchyPython
85
0

I introduce a few list methods, that allow you to perform basic operations on lists, such as adding items to a list, sorting them, removing them, concatenating lists and clearing them. In detail:
append - add an element
extend - add all the elements of another list
remove - delete a specific element
pop - return the element at the given position and delete it
reverse - invert the order of elements
sort - sort the list
clear - remove all elements.

For more information, see the notebooks below (notebooks will open on Google Colab - no installation required)

Embedded video, part of the following courses:
Computer Programming at Queen Mary, University of London
Jupyter notebook: https://tinyurl.com/3xjmpf94
Coding for Scientists at Queen Mary, University of London
Jupyter notebook: https://tinyurl.com/yedumefr


Watch video Handling Python lists: methods for adding and retrieving elements (and sorting, reversing, etc) online without registration, duration hours minute second in high quality. This video was added by user PatchyPython 07 September 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 85 once and liked it 0 people.