Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.
Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.
Lists in Python are versatile data structures that can store multiple items in a single variable. They are ordered, mutable, and support various operations such as accessing, modifying, and traversing elements. This chapter covers the creation and manipulation of lists, including functions for adding and removing elements, as well as advanced topics like list comprehension and applications in AI.
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
References
ch20.pdfClass Notes
Memorization
What we have learnt
Final Test
Revision Tests
Term: List
Definition: A collection of items enclosed in square brackets, allowing storage of multiple data types.
Term: Slicing
Definition: A method to obtain a subset from the list using range indices.
Term: List Comprehension
Definition: A concise way to create lists based on existing lists in a single line of code.
Term: Mutable
Definition: A property of lists allowing their contents to be changed after creation.
Term: Nested Lists
Definition: Lists that contain other lists as elements, suitable for representing matrices or grids.