● LIVE
OpenAI releases GPT-5 APIIndia AI startup raises $120MBitcoin ETF hits record inflowsMeta Llama 4 benchmarks leakedOpenAI releases GPT-5 APIIndia AI startup raises $120MBitcoin ETF hits record inflowsMeta Llama 4 benchmarks leaked
📅 Sat, 21 Mar, 2026✈️ Telegram
AiFeed24

AI & Tech News

🔍
✈️ Follow
🏠Home🤖AI💻Tech🚀Startups₿Crypto🔒Security🇮🇳India☁️Cloud🔥Deals
✈️ News Channel🛒 Deals Channel
Home/Cloud & DevOps/Task 3: Delivery Man Task
☁️Cloud & DevOps

Task 3: Delivery Man Task

1.Create a list and print the third item items = ["Notebook", "Pencil", "Eraser", "Ruler", "Marker"] print(items[2]) Explanation: Add “Glue Stick” to the list Concept: Use append() to add at the end. items.append("Glue Stick") print(items) Explanation: Insert “Highlighter” Concept: Use insert(index,

⚡Quick SummaryAI generating...
J

JAYA SRI J

📅 Mar 21, 2026·⏱ 5 min read·Dev.to ↗
✈️ Telegram𝕏 TweetWhatsApp
📡

Original Source

Dev.to

https://dev.to/jaya_srij_c37a6ea796335c/task-3-delivery-man-task-ak
Read Full ↗

1.Create a list and print the third item
Concept: Lists store multiple values. Index starts from 0.

items = ["Notebook", "Pencil", "Eraser", "Ruler", "Marker"]
print(items[2])

Explanation:
Index 2 refers to the third element → "Eraser".

  1. Add “Glue Stick” to the list Concept: Use append() to add at the end.
items.append("Glue Stick")
print(items)

Explanation:
append() adds a new item to the end of the list.

  1. Insert “Highlighter” Concept: Use insert(index, value).
items.insert(2, "Highlighter")
print(items)

Explanation:
“Highlighter” is inserted at index 2 (between 2nd and 3rd items).

  1. Remove “Ruler” Concept: Use remove().
items.remove("Ruler")
print(items)

Explanation:
Removes the specified value from the list.

5.Print first three items
Concept: List slicing.

print(items[:3])

Explanation:
[:3] returns first three elements.

  1. Convert to uppercase Concept: List comprehension.
upper_items = [item.upper() for item in items]
print(upper_items)

Explanation:
Each item is converted to uppercase.

  1. Check if “Marker” exists Concept: Membership operator in.
if "Marker" in items:
    print("Marker is found")
else:
    print("Marker is not found")

Explanation:
Checks if the item exists in the list.

8.Count number of items
Concept: Use len().

print(len(items))

Explanation:
Returns total number of elements.

  1. Sort the list Concept: Use sort().
items.sort()
print(items)

Explanation:
Sorts list alphabetically.

10.Reverse the list
Concept: Use reverse().

items.reverse()
print(items)

Explanation:
Reverses the order of elements.

  1. List with item and delivery time Concept: Nested lists.
delivery = [["Notebook", "10 AM"], ["Pencil", "11 AM"]]
print(delivery[0])

Explanation:
Prints first item and its time.

12.Count occurrences of “Ruler”
Concept: Use count().

print(items.count("Ruler"))

Explanation:
Counts how many times it appears.

  1. Find index of “Pencil” Concept: Use index().
print(items.index("Pencil"))

Explanation:
Returns position of the item.

  1. Extend list with new items Concept: Use extend().
new_items = ["Pen", "Sharpener"]
items.extend(new_items)
print(items)

Explanation:
Adds multiple items to list.

15.Clear the list
Concept: Use clear().

items.clear()
print(items)

Explanation:
Removes all elements.

16.Repeat item three times
Concept: List multiplication.

items = ["Notebook"] * 3
print(items)

Explanation:
Repeats the item three times.

17.Nested list comprehension (item + length)
Concept: Advanced list comprehension.

items = ["Notebook", "Pencil", "Eraser"]
result = [[item, len(item)] for item in items]
print(result)

Explanation:
Each sublist contains item and its length.

18.Filter items with letter “e”
Concept: Conditional list comprehension.

filtered = [item for item in items if "e" in item]
print(filtered)

Explanation:
Only items containing “e” are included.

19.Remove duplicates
Concept: Use set().

items = ["Notebook", "Pencil", "Notebook", "Eraser"]
unique_items = list(set(items))
print(unique_items)

Explanation:
Set removes duplicate values.

Tags:#cloud#dev.to

Found this useful? Share it!

✈️ Telegram𝕏 TweetWhatsApp

Read the Full Story

Continue reading on Dev.to

Visit Dev.to ↗

Related Stories

☁️
☁️Cloud & DevOps

Majority Element

about 2 hours ago

☁️
☁️Cloud & DevOps

Building a SQL Tokenizer and Formatter From Scratch — Supporting 6 Dialects

about 2 hours ago

☁️
☁️Cloud & DevOps

Markdown Knowledge Graph for Humans and Agents

about 2 hours ago

Moving Beyond Disk: How Redis Supercharges Your App Performance
☁️Cloud & DevOps

Moving Beyond Disk: How Redis Supercharges Your App Performance

about 2 hours ago

📡 Source Details

Dev.to

📅 Mar 21, 2026

🕐 about 5 hours ago

⏱ 5 min read

🗂 Cloud & DevOps

Read Original ↗

Web Hosting

🌐 Hostinger — 80% Off Hosting

Start your website for ₹69/mo. Free domain + SSL included.

Claim Deal →

📬 AiFeed24 Daily

Top 5 AI & tech stories every morning. Join 40,000+ readers.

✦ 40,218 subscribers · No spam, ever

Cloud Hosting

☁️ Vultr — $100 Free Credit

Deploy cloud servers in 25+ locations. From $2.50/mo. No contract.

Claim $100 Credit →
AiFeed24

India's AI-powered tech news hub. Daily coverage of AI, startups, crypto and emerging technology.

✈️🛒

Topics

Artificial IntelligenceStartups & VCCryptocurrencyCybersecurityCloud & DevOpsIndia Tech

Company

About AiFeed24Write For UsContact

Daily Digest

Top 5 AI stories every morning. 40,000+ readers.

No spam, ever.

© 2026 AiFeed24 Media.Affiliate Disclosure — We earn commission on qualifying purchases at no extra cost to you.
PrivacyTermsCookies