Lists (append, sort, pop, slice, in, enumerate) - Python Tutorial for Beginners #8

9views
00
8:07
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
Learn Python lists in this beginner-friendly tutorial! ๐Ÿ“‹ In this lesson, you will learn: โœ… Creating lists with square brackets โœ… Indexing and slicing to access elements โœ… Membership testing with the in keyword โœ… List methods: append, insert, remove, pop โœ… Sorting, reversing, and copying lists โœ… Mini Project: Grocery List Manager ๐Ÿ• Timestamps: 0:00 - Introduction 0:22 - List Basics Explained 0:46 - List Basics Demo 2:05 - List Methods Explained 2:29 - List Methods Demo 3:56 - Mini Project Explained 4:20 - Grocery List Demo 6:36 - Recap 7:11 - End ๐Ÿ’ป Source Code: https://github.com/GoCelesteAI/python_lists ๐Ÿ“š Code from this lesson: # List Basics colors = ["red", "green", "blue"] print(colors[0]) print(colors[1:4]) print("red" in colors) # List Methods fruits.append("cherry") fruits.insert(1, "mango") fruits.remove("banana") last = fruits.pop() nums.sort() # Grocery List Manager while True: cmd = input("Command: ") if cmd == "add": items.append(item) elif cmd == "show": for i, item in enumerate(items, 1): print(f" {i}. {item}") ๐Ÿ”— Previous: Lesson 7 - Loops & Iteration ๐Ÿ”— Next: Lesson 9 - Tuples & Sets #Python #PythonTutorial #LearnPython #Programming #Lists #PythonLists Tags: Python, Python tutorial, Python for beginners, learn Python, Python lists, list methods, append, sort, pop, slice, enumerate, in keyword, indexing, grocery list, CelesteAI
Back to tutorials

Duration

8:07

Published

February 8, 2026

Added to Codegiz

March 15, 2026

๐Ÿ“– Read the articleOpen in YouTube