TalentJR

Lesson 10

Introduction to Lists

Store multiple values in a single variable

1Creating Lists✨

💻 code
fruits = ["apple", "banana", "orange"]
numbers = [1, 2, 3, 4, 5]
mixed = [1, "hello", 3.14, True]

2Accessing Elements🎯

💻 code
fruits[0]   # "apple" (first item)
fruits[1]   # "banana"
fruits[-1]  # "orange" (last item)

3List Length💡

💻 code
len(fruits)  # 3

4Adding to Lists🚀

💻 code
fruits.append("grape")  # Add at end
fruits.insert(0, "mango")  # Add at position

5Removing from Lists🔍

💻 code
fruits.remove("banana")  # Remove by value
fruits.pop()  # Remove last item

6List Operations⭐

💻 code
numbers = [1, 2, 3, 4, 5]
print(max(numbers))  # 5
print(min(numbers))  # 1
print(sum(numbers))  # 15

7Looping Through Lists🧩

💻 code
for fruit in fruits:
    print(fruit)

🎯 Practice Challenges

Master Introduction to Lists by completing all 3 difficulty levels

🟢 EASY

Introduction to Lists - Easy Challenge

Start with the basics. Perfect for beginners!

🟡 MEDIUM

Introduction to Lists - Medium Challenge

Get more challenging. Build your confidence!

🔴 HARD

Introduction to Lists - Hard Challenge

Master this concept. Prove your skills!

🏆 Study a lesson for 2+ minutes to earn +10 TalentJR Points a day. Badges, certificates & prizes →

Ready to Master Introduction to Lists? 🚀

Complete the challenges, take the quiz and keep your learning streak going!