Vigyata.AI
Is this your channel?

L-4 Tuples in Python | List vs Tuple

335 views· 31 likes· 9:35· Mar 4, 2026

🛍️ Products Mentioned (1)

In this Lecture of our Python for AI & Data Science series, we learn about Tuples in Python and understand the important difference between List and Tuple. GitHub: https://github.com/codewithaarohi/Python_for_DataScience/blob/main/tuple_program.ipynb At first, tuples look exactly like lists. But there is one MAJOR difference. And that difference is extremely important in real programming and AI systems. In this video, you will learn: ✔ What is a Tuple ✔ How to create a tuple ✔ Tuple indexing (including negative indexing) ✔ Why tuple is immutable ✔ Difference between list and tuple ✔ When to use list vs tuple ✔ Single value tuple (common beginner mistake) ✔ Practical examples You’ll understand why tuples are used for fixed data. If you are preparing for Machine Learning, AI, or Data Science, this concept is very important. Practice the task given in the video and comment “TUPLE DONE” after completing it. Next Lecture: Dictionaries in Python (Very Important for APIs & AI Systems) 📸 Follow me on Instagram: @codewithaarohihindi 🔗 https://instagram.com/codewithaarohihindi 📧 You can also reach me at: aarohisingla1987@gmail.com

About This Video

इस lecture में मैं Python tuples को बिल्कुल basics से समझाती हूँ—और सबसे पहले clear करती हूँ कि tuples दिखते तो lists जैसे ही हैं, लेकिन एक MAJOR difference है जो real programming और AI systems में बहुत matter करता है। मैं Jupyter notebook में नया file बनाकर दिखाती हूँ कि list में हम square brackets [] use करते हैं, और tuple में parentheses ()। फिर मैं tuple print करके, indexing समझाती हूँ—zero-based indexing, और negative indexing (जैसे -1 से last item)। इसके बाद मैं list vs tuple का core point बताती हूँ: tuple immutable होता है। मतलब एक बार tuple बना दिया, तो उसके अंदर की values को modify नहीं कर सकते—अगर आप item assignment करोगे तो error आएगा: “tuple object does not support item assignment”. वही same काम list में करोगे तो value change हो जाएगी। मैं यह भी बताती हूँ कि tuple कब use करना चाहिए—जब data fixed रखना हो, safety purpose के लिए, जैसे weekdays या latitude-longitude coordinates, ताकि कोई गलती से भी values change न कर पाए। End में मैं assignment देती हूँ: 5 numbers का tuple बनाओ, first और last value print करो, modify करके error देखो, फिर same list बनाकर modify करके difference observe करो—और comment करना “TUPLE DONE”.

Frequently Asked Questions

🎬 More from Code With Aarohi Hindi