Tutorial 6- Python List And Its Inbuilt Function In Hindi

Krish Naik Hindi
6 Feb 202222:50

Summary

TLDRThe video script is an educational tutorial focused on Python programming, specifically discussing lists as an important data structure. It covers list properties, methods like indexing, inserting, and popping elements, and the use of list functions. The instructor also explains concepts like mutable and immutable objects, nested lists, and list operations, providing examples and emphasizing the versatility of lists in Python for various functionalities.

Takeaways

  • 😀 The video is a tutorial on Python lists, focusing on their structure and functions.
  • 📝 The speaker introduces the concept of 'in-built' data structures in Python, emphasizing their importance due to their functionality and versatility.
  • 🔍 The tutorial covers methods and uses of lists, including how to implement and manipulate them for various functionalities.
  • 🎯 The script mentions 'fight tiles' and 'previously explained' data structures, indicating a series or sequential learning content.
  • 📚 The importance of understanding indexing in lists is highlighted, with explanations on how to access and modify list elements using indices.
  • 👉 The concept of list indexing starts from 0 in Python, which is a fundamental aspect for accessing list items.
  • 🔑 The script discusses the immutability of certain elements within lists, such as strings, and how they cannot be changed after being set.
  • 📈 The tutorial explains how to add elements to a list using methods like 'append' and 'insert', and the difference between the two.
  • 🛑 The 'pop' method is introduced as a way to remove elements from a list, updating the list and changing its length.
  • 🔄 The video mentions the use of list comprehensions and the ability to create new lists by applying operations on existing lists.
  • 🔍 The script touches on the use of list methods like 'copy', 'count', 'pop', 'reverse', and their functionalities in manipulating lists.

Q & A

  • What is the main topic of the video?

    -The main topic of the video is discussing the 'list' data structure in Python, its properties, and various functionalities.

  • Why are lists considered important in Python?

    -Lists are important in Python because they are versatile and can be used to implement many functionalities, making them a fundamental part of the language.

  • What is the term used to describe the order of elements in a list?

    -The term used to describe the order of elements in a list is 'indexing', where each element has a specific position identified by an index.

  • What is indexing in the context of lists?

    -Indexing in the context of lists refers to the method of accessing elements in a list using their position numbers, starting from 0 for the first element.

  • How can you add items to the end of a list in Python?

    -You can add items to the end of a list in Python using the 'append()' method, which adds the item as the last element.

  • What is the purpose of the 'insert()' method in lists?

    -The 'insert()' method is used to add an item to a list at a specific index, shifting the subsequent elements to the right.

  • How can you remove an item from a list by its value?

    -You can remove an item from a list by its value using the 'remove()' method, which removes the first occurrence of the specified value.

  • What is the difference between 'pop()' and 'remove()' methods in lists?

    -The 'pop()' method removes an item at a specified index and returns the value of the removed item, while 'remove()' removes the first occurrence of a specified value without considering its position.

  • What does the script mention about the immutability of list elements?

    -The script mentions that lists are mutable, meaning you can change the elements within a list, but the type of elements should remain consistent.

  • How can you access a range of elements from a list?

    -You can access a range of elements from a list using slicing, which involves specifying the start and end indices within square brackets.

  • What is the significance of the 'clear()' method in lists?

    -The 'clear()' method is used to remove all items from a list, effectively clearing it and leaving it empty.

Outlines

00:00

😀 Introduction to Python's List Data Structure

The speaker, named Question, welcomes viewers to their YouTube channel focused on Python playlists. The discussion centers on the importance of the list data structure in Python, which is used in many functionalities. The speaker has previously covered number methods and will now focus on lists, including list properties and terminology. They provide a comprehensive guide in the video description, including a link to vitamin E for further information. The explanation begins with the basics of what a list is as a data structure in Python, its mutability, and how it differs from strings.

05:00

📝 Exploring List Operations and Indexing

This paragraph delves into various operations that can be performed on lists, such as adding, deleting, and modifying elements. The concept of indexing is introduced, explaining how lists are zero-indexed in Python. The speaker demonstrates how to access and manipulate elements within a list using indexing techniques and also touches on the topic of list nesting, where a list can contain other lists as elements. The summary highlights the ability to change list items and the importance of understanding indexing for list manipulation.

10:04

🔍 Advanced List Techniques and Functions

The speaker discusses advanced techniques for working with lists, including the use of methods like 'append', 'insert', and 'pop'. They explain how to add elements to the end of a list, insert items at a specific index, and remove elements, updating the list in the process. The paragraph also covers the use of list functions to find the length of a list, minimum, and maximum values, and how to reverse a list. The summary emphasizes the versatility and power of lists in Python for data manipulation.

15:04

📚 Understanding List Conversion and Nested Lists

This section covers how to convert between different data types and work with nested lists. The speaker provides examples of converting lists into other structures and vice versa. They also explain the concept of nested lists, where a list can be an element of another list, and how to perform operations on these complex structures. The summary underlines the importance of list conversion and the management of nested lists for more complex data handling.

20:06

🛠️ List Methods and Practical Examples

The speaker introduces various list methods such as 'remove', 'count', 'sort', and 'reverse', explaining their functionality and practical applications. They provide examples of how to use these methods to manipulate list items programmatically. The paragraph also includes a discussion on the use of list comprehensions for creating new lists based on existing ones. The summary focuses on the practical use of list methods and comprehensions for efficient data management.

🎨 Concluding with List Practicality and Encouragement

In the concluding paragraph, the speaker summarizes the importance of lists in Python and encourages viewers to explore and practice using lists in their programming. They mention their intention to cover dictionaries and other data structures in future tutorials and ask viewers to subscribe to the channel for more content. The summary highlights the speaker's enthusiasm for teaching Python and their commitment to providing educational content.

Mindmap

Keywords

💡Python

Python is a high-level, interpreted programming language known for its readability and efficiency. In the context of this video, Python is the main programming language being discussed, with a focus on its list data structure. The script mentions Python's list functionality several times, indicating its importance in the video's theme of data manipulation and programming.

💡List

A list in Python is a built-in data structure that allows for the storage of ordered collections of items. The video script frequently refers to lists, demonstrating various operations like adding, removing, and accessing elements. Lists are central to the video's educational content on Python programming.

💡Data Structure

A data structure is a specialized format for organizing, processing, retrieving, and storing data. The script discusses the list as an important data structure in Python, emphasizing its utility in implementing various functionalities within the language.

💡Indexing

Indexing refers to the method of accessing elements in a list by their position. The video script explains how indexing works in Python lists, noting that it starts from 0, and demonstrates accessing specific elements using index numbers.

💡Element

An element in the context of lists is an individual item stored within the list. The script uses the term 'element' to describe the items that can be manipulated within a Python list, such as adding new elements or removing existing ones.

💡Functionality

Functionality refers to the specific features or capabilities that can be utilized within a program. The video script discusses the functionalities that can be implemented using Python lists, such as methods for manipulating list elements.

💡Type

In programming, 'type' refers to the classification of data, such as integers, strings, or lists. The script mentions 'type' in the context of identifying the data type of list elements, showcasing the importance of data typing in Python.

💡String

A string is a sequence of characters used in programming to represent text. The video script includes strings as an example of data that can be stored in a list, highlighting the versatility of lists in handling different data types.

💡Mutable

Mutable means that an object can be modified after its creation. The script explains that lists in Python are mutable, allowing for changes to the list's content, such as adding or removing elements, which is a key point in the video's discussion on list manipulation.

💡Immutable

Immutable objects, in contrast to mutable ones, cannot be changed once created. The video script mentions immutability in the context of strings, explaining that strings are immutable, which means their values must be replaced rather than modified in place.

💡Nested List

A nested list is a list that contains other lists as its elements. The script touches on the concept of nested lists, demonstrating the complexity and depth that can be achieved with list structures in Python.

Highlights

Introduction to the Python playlist focusing on data structures with a detailed discussion on lists.

Explanation of why understanding list data structures is important due to their use in implementing various functionalities.

Total Fight Tiles have been covered, setting the stage for the discussion on list methods and their significance.

Introduction to the concept of indexing in lists and how it is used to access and manipulate list elements.

Understanding the terminology and properties of lists, such as 'double' and 'changeable', and their implications.

Demonstration of how to define a list in Python and the syntax involved.

Explanation of list indexing, starting from 0 in Python, and how to retrieve elements using this method.

How to insert elements into a list at a specific index and the impact on the existing elements.

The concept of 'not support item said' in lists and the restrictions it imposes on inserting non-string elements.

Discussion on the mutability of lists and how it allows for changes to the elements within the list.

Introduction to list operations such as adding elements to the end of a list using the 'append' method.

Explanation of nested lists and how to perform operations on elements within these complex structures.

How to use list functions like 'pop' to remove elements and the effect on the list.

The use of slicing in lists to extract a range of elements and its practical applications.

Understanding the limitations of performing mathematical operations on lists and the need for iteration.

The importance of list methods like 'extend' for combining lists and the resulting list structure.

How to create and manipulate lists of lists, demonstrating the versatility of lists in Python.

Conclusion summarizing the key points covered in the video and the importance of lists in Python programming.

Transcripts

play00:00

हेलो गाइस माइ नेम इज क्वेश्चन है कल

play00:01

वेलकम टू माय YouTube चैनल सो गाइस हम लोग

play00:03

पाइथन का प्लेलिस्ट करती हूं करेंगे और

play00:05

आपके वीडियो में हम एक इन प्रिंट डाटा

play00:08

स्ट्रक्चर पाइथन में जैसे लिस्ट उसके बारे

play00:11

में डिस्कशन करने वाले हैं यह कहां से

play00:13

इंपॉर्टेंट डाटा स्ट्रक्चर है क्योंकि

play00:14

इसको यूज करते हैं बहुत सारे फंक्शनैलिटीज

play00:17

इंप्लिमेंट कर सकते हैं तो इतिहास

play00:19

डेफिनेटली इंपॉर्टेंट कि आपको इस इन बी

play00:21

डाटा स्ट्रक्चर के बारे में पता रहे हैं

play00:23

अभी तक मैंने टोटली फाइट टाइल्स डाल चुका

play00:26

हूं और प्रीवियसली मैंने जो इन डाटा

play00:28

स्ट्रक्चर के बारे में एक्सप्लेन किया है

play00:30

वह है नंबर है नंबर मेथड और इस वीडियो में

play00:33

हम फोकस करेंगे और लिस्ट के बारे में बट

play00:36

उससे पहले में इस ट्रिक्स के बारे में भी

play00:38

थोड़ा कुछ बता दूंगा इसमें क्योंकि हम को

play00:40

थोड़े टर्मिनोलॉजिस पता लगाने पड़ेंगे

play00:43

जहां पर लिस्ट का एक प्रॉपर्टी होता है

play00:45

ड्यूटेबल ठीक है तो चलिए पहली बात तो हम

play00:48

लोग डिस्कशन करते की लिस्ट होता क्या है

play00:50

ठीक है तो यहां पर यह सारा का सारा

play00:52

मटेरियल मैंने प्रोवाइड कर दूंगा पूरे

play00:55

डिस्क्रिप्शन में विटामिन ए में अपलोड कर

play00:57

देता हूं आप यहां से देख सकते हैं तो चलिए

play00:59

हम लोग समझते कि क्या है लिस्ट इसे डाटा

play01:01

स्ट्रक्चर इन पाइथन ड्यूटेबल और चेंजेबल

play01:05

मिठाई वोट को याद रखिए ड्यूटेबल और

play01:07

चेंजेबल ऑडियंस आफ एलिमेंट्स विच एलिमेंट

play01:10

और वैल्यूज इंसाइड आफ लिस्ट्स ऑल आइटम्स

play01:13

जस्ट ए स्ट्रिंग डिफाइंड एस कैरेक्टर

play01:16

बिटवीन कोट्स लिस्ट फ्रॉम डिफरेंट यूजेस

play01:18

फॉर योर ब्राइट चली तो एक्सप्लेन कर देता

play01:20

हूं कि क्या चीज के बारे में हम यहां

play01:22

डिस्कशन कर रहे हैं और बहुत इंपोर्टेंट

play01:24

पॉइंट है जो हम लोग ड्यूटेबल है

play01:28

थे वॉयसेस इन ड्यूटेबल ठीक है तो यह वर्ड

play01:33

हमलों को समझने के लिए बहुत ही जरूरी यह

play01:36

समझना चाहिए कि हम पहले से इंस्टोल का

play01:39

एक्सांपल अब मैं एक्स्ट्रा डिफाइन कर देता

play01:41

हूं यहां पर मैं लिख देता हूं प्रवेश और

play01:45

मैं आप प्रिंट कर देता हूं तृषा

play01:47

5001 ठीक है और मैं यहां भी यह भी देख

play01:51

लेता हूं कि टाइप ऑफ स्टीवन किया है तो

play01:54

यहां एकजुट करता हूं तो यह आप देख सकते

play01:56

हैं कि मेरा स्टीव वैल्यू कृष्ण आ रहा है

play01:59

और इसका टाइप है एचटी चाणक्य स्ट्रिंग

play02:02

डाटा टाइप करें ठीक है अब समझिए मैं यही

play02:06

वाले वेरिएबल को के लिए वैरी बन गया

play02:09

एडजस्ट में डबल अब यह सीरियल को वैल्यू

play02:12

कुछ और साइन कर देता हूं जिससे इसका टूटे

play02:14

या दूसरा स्ट्रीम में साइन कर देता हूं

play02:16

यहां पर हम बोलते हैं नायरा ठीक है मेरा

play02:19

सर ने मैं अब मैं इसको प्रिंट कर देता हूं

play02:21

इसलिए और वन अब इसका आउट क्या होगा आप

play02:23

क्लीयरली बता पाएंगे कि उक्त सभी एक चीज

play02:26

होने वाला है यहां पर की जो इस में काव्य

play02:29

जो क्रस्ट पहले अपना एक होने वाला है तो

play02:32

हम यहां एकजुट कर देते हैं तो यहां पर आप

play02:34

देखिए यहां पर नायक आ रहा है ठीक है तो आप

play02:36

तो बहुत ही क्लियर है कि स्ट्रिंग का

play02:38

वॉल्यूम कंप्लीट ही रिप्लेस डेफिनेटली कर

play02:41

पाते हैं ठीक है अब यह चीज हो गया आपसे तो

play02:44

नेक्स्ट चीज हम एक और चीज देखते हैं यहां

play02:46

पर चले मैं यह सेल को पूरा डिलीट कर देता

play02:49

हूं और डिलीट भी नहीं करता है नया सेल बना

play02:51

देता हूं चलिए अब यहां पर मैं लिखता हूं

play02:54

देखिए बहुत ही इंपोर्टेंट चीज है मैं जो

play02:56

लिख रहा हूं यहां पर अगर मैं को star123

play02:59

जो है नायक ठीक है यह एक पूरा कलेक्शन ऑफ

play03:03

कलेक्शन ऑफ डायरेक्टर्स है ठीक है अगर मैं

play03:07

स्ट्रिंग के अंदर बोलूं क्या आइटम्स

play03:08

प्रेसिडेंट होते हैं आइटम्स मतलब इसमें

play03:11

आइटम्स क्या है पूरा बोर्ड को में एक आइटम

play03:13

लेंगे नहीं सिंह के अंदर आइटम होते हैं यह

play03:16

कैरेक्टर्स ठीक है यह कैरेक्टर्स यह

play03:19

कैरेक्टर और यह कैरेक्टर यह कैरेक्टर यह

play03:21

क्या है ठीक है

play03:22

एनकांउटर अलग ए कैरक्टर आफ कार्यालय क्या

play03:26

हम इस कैरेक्टर को एक उतर पाएंगे तो बहुत

play03:30

ही सिंपल तरीके से एक्सेस कर पाएंगे और

play03:32

समझा मैं लिख देता हूं यहां पर इंडेक्सिंग

play03:34

हुए 20 मिनट तो अगर मैं जीरो एलिमेंट लिख

play03:38

दूं ठीक है तू क्या होगा अगर मैं इसको कट

play03:41

कर देता हूं तो आप सोचिए क्या आउटपुट आएगा

play03:43

ठीक है इसका ऑफिस लिए भागना तो यहां पर

play03:47

देखिए बना रहा है बहुत ही क्लियर आ रहा है

play03:50

ठीक है तो इसका मतलब अगर मेरे को फर्स्ट

play03:53

एलिमेंट यहां से उठाना है तो मैं

play03:56

इंडेक्सिंग टेक्निक से उसको उठा सकता हूं

play03:58

ठीक है अगर समझो मेरे को आई उठाना है तो

play04:01

क्या होगा इंडक्शन 012 हमेशा याद रखे

play04:04

पाइथन में इंडक्शन 0 से स्टार्ट होता है

play04:06

तो मैं बिट्टू करो तो यहां पर आया गया अब

play04:09

चलिए हम लोग को पता चल गया कि हम लोग एक

play04:11

स्पेसिफिक आइटम उठा सकते हैं और बेसिकली

play04:14

ट्वीट कर सकता डिस्प्ले कर सकते हैं जितना

play04:16

पर क्लियर हो गया होगा अब मैं नेक्स्ट जीत

play04:18

इसने यह करूंगा कि भाई मेरे को आप एक

play04:21

एलिमेंट डालना है चलो मैं एक्स्ट्रा ऑइल

play04:23

ऐड कर देता हूं इसकी टू में यहां पर क्या

play04:26

मैं आइटम को आसान कर सकता आइटम सांग कि

play04:28

मैं आज के बदले कुछ और वैल्यू डाल सकता

play04:31

हूं क्या आई के बदले में क्या डाल सकता है

play04:34

या के डाल सकता है कुछ भी एलिमेंट डाल

play04:36

सकता हूं इसमें तो अगर मैं इसको

play04:38

एग्जिक्यूट करूं तो यहां दिखेगा आपको

play04:40

गहराएगा एसटीआर ऑब्जेक्ट डर नॉट सपोर्ट

play04:44

आइटम साइंटिफिक हंसी इंपोर्टेंट है इसमें

play04:47

आइटम है कैरेक्टर्स और उसके बदले में कुछ

play04:50

भी नहीं डाल सकता वहीं एक चीज बोल रहा है

play04:53

बे नॉट सपोर्ट आइटम सांग में इसका मतलब

play04:55

अगर आप इस टाइम का वैल्यू डिसाइड कर देते

play04:58

हैं वह उसके अंदर का आइटम्स आप चेंज नहीं

play05:00

कर पाएंगे तो इसीलिए हम लोग इसमें बोलेंगे

play05:03

कि स्टफिंग आ रिन्यूएबल यहां पर में कमेंट

play05:06

लिख देता हूं फिर इंतजार इन उर टेबल बहुत

play05:09

ही इंपोर्टेंट चीज है बहुत इंपोर्टेंट चीज

play05:12

है अब आपको पता चल गया

play05:15

तो उसमें चेंज कर पाएंगे ठीक है तो यह

play05:20

कनेक्शन डाटा

play05:22

इन टेबल चेंज

play05:27

चेंज कर सकते है बट इट इज नॉट ड्यूटेबल

play05:31

ठीक है यह हमेशा याद रखिए चलिए अब स्क्रीन

play05:35

का आईडिया आपको आ गया स्ट्रीट में काफी इन

play05:37

थिस फंक्शन भी होते हैं जो मैं प्रॉब्लम

play05:40

वीडियो में डिवाइड कर दूंगा बट हम समझते

play05:42

कि लिस्ट के बारे में डिस्कशन कर रहे हैं

play05:44

तो यह लिस्ट को हम लोग कैसे डिफाइन करते

play05:47

हैं जैसे बोला मैं स्ट्रिंग को हम डबल कोट

play05:49

यूज करते हैं लिस्ट को हम एंगुलर

play05:52

बेनेफिट्स मतलब स्क्वेयर ब्रैकेट्स यूज

play05:54

करते हैं गूलर ने बंगलौर हम लोग डिक्शनरी

play05:56

और सेट वह सब जगह में यूज करेंगे अगर मैं

play05:59

साइन अप बैक इट्स लिख दूं और यहां पर मैं

play06:01

लिख दूं टाइप ऑफ दिस देखिए अभी एमपी लिस्ट

play06:04

भी है तो यह दिखाएगा कि यह ऑब्जेक्ट जो भी

play06:08

यह बाहरी हमलों में अंदर लिखा है इट इज द

play06:10

लिस्ट क्यों यह यौवन से बेसिकली रफ पता

play06:15

लगा पा रहा है The Amazing

play06:17

ऑस्कर रैकेट अगर समझिए लिस्ट डिफाइन करना

play06:20

है यह तो एमपी लिस्ट है ठीक है मैं यहां

play06:22

पर डिवाइड कर देता हूं एक वैल्यू इसे

play06:25

इलेक्ट्रिक का यह टेस्टी मत लिखिएगा टेस्ट

play06:28

क्वाइट क्लियर है जो लिस्ट basic क्लास है

play06:31

जो लिस्ट बनाता है उस तरीके से हम लोग

play06:34

डिफरेंट कर सकते हैं मैं यहां का यात्रा

play06:37

करूंगा वन कमेंट टो कनेक्ट विद कामुक हो

play06:39

ठीक है तो यहां लिख देता हूं मैं लेस ठीक

play06:42

ठीक है तो यहां पर मैं जो प्ले लिस्ट लिख

play06:44

दिया और हमेशा याद रखिए इट इज नॉट नेसेसरी

play06:47

कि आप एक ही टाइप का डेटा ही डाले आप इस

play06:49

ट्रिक भी डाल सकते हैं ठीक है घूमो जीनियस

play06:51

कलेक्शन होता है लिस्ट के अंदर ठीक है मैं

play06:54

यहां पर लिख दूंगा हेलो सब्सक्राइब माय

play06:56

चैनल कुछ भी लिख दूंगा मैं सेंटेंस भी लिख

play06:58

सकता हूं कुछ भी अगर मैं फ्रेंड लिस्ट कर

play07:00

देता हूं तो यहां देखिए आपको लिस्ट दिखेगा

play07:03

वह ठीक है यह चीज बहुत ही क्लियर है आपको

play07:06

अब दूसरा चीज यह है अगर मैं इसके अंदर के

play07:09

लिए प्रिंट हो गया अब मैं लिख देता हूं और

play07:12

लास्ट लीफ

play07:13

Hero अब एक हमको आइटम उठाना है ठीक है मैं

play07:17

लिंक दे तो प्रिंट आफ इलेक्ट्रोंस जीरो

play07:19

इसका मतलब क्या है फर्स्ट इंडेक्सेस में

play07:21

फर्स्ट इन नेक्स्ट 302 सबसे

play07:25

ज़ोर

play07:26

ठीक है अगर मैं पर हिस्ट्री ऑफ़ बरोदा रहा

play07:30

हूं तो ऑफिस मेरा वैल्यू बानो का यज्ञ

play07:32

समझिए यहां पर फोर्थ इंडेक्स फंड जुटाना

play07:35

चाहता हूं तो यह बेसिकली यह जीरो 1234 पाठ

play07:38

दूंगा तो यहां पर मैं को हेलो आ रहा है वह

play07:41

ठंडक में उठा देता हूं तो इसका वैल्यू

play07:43

होगा करें ठीक है यह बहुत ही सिंपल तरीके

play07:46

से आप रिट्वीट कर पा रहे हैं जैसे हम लोग

play07:48

फिल्में कर पा रहे हैं और इसमें आइटम्स

play07:50

क्या है यह जो वैल्यूज हम लोग कॉपर करके

play07:53

लिख रहे हैं यह हर एक आइटम है आइटम

play07:55

होमोजीनस हेटेरोजेनियस दोनों हो सकता है

play07:57

कुछ भी आप डाल सकते अंदर ठीक है यह बहुत

play08:01

इंपोर्टेंट चीज पसंद स्टंट करने के लिए

play08:04

अगर हम यूटिलिटी का बात करें गैस करी कि

play08:07

ड्यूटेबल होता है कि नहीं है ठीक है

play08:10

कि आप देख लिया है यह प्रिंट टेस्टी फॉर

play08:12

जब मैं प्रिंट कर रहा हूं चलिए मैं यहां

play08:15

पर प्रिंट कर रहा हूं टेस्टी फोर तो आपको

play08:17

दिया कि भाई कृष्ण दिख रहा है चलो अब हम

play08:21

क्या करते हैं लिस्ट फॉर के बदले कुछ लिख

play08:23

देता है जिससे मैं लिख देता हूं नायक तो

play08:26

यहां पर क्या कर रहा हूं मैंने यह फोर्थ

play08:28

वाले एलिमेंट के बदले मैं नायक लिख रहा

play08:30

हूं तो राधे कृष्ण को नासिक से रिप्लेस कर

play08:32

देगा उसके बाद अगर मैं प्रिंट करूं तो यह

play08:35

देखिए नायक हो रहा है दैट बेसिकली लिस्ट

play08:38

इस न्यू टेबल और यही डेफिनेशन मैं आपको

play08:41

दिखाने कोशिश कर रहा था कि ड्यूटेबल और

play08:44

चेंजेबल चेंजेबल तो डेफिनेटली मैं इसको

play08:46

ऐसे भी चेंज कर पाऊंगा और सीक्वेंस आफ

play08:49

एलिमेंट्री आ सकता है कुछ भी आ सकता है

play08:51

ठीक है तो आई हॉप आप लोगों को इतना समझ

play08:54

में आया ठीक है और लिस्ट आफ यूसेज बहुत ही

play08:57

ज्यादा है गई ठीक है बहुत सारे तरीके से

play08:59

आपको डाटा लाना है उसका प्ले लिस्ट कंवर्ट

play09:01

करते हैं यह सब चीज हम लोग देखेंगे आगे

play09:03

जैसे अमरुद जा रहे हैं ठीक है चलिए अब

play09:06

इतना तो हो गया चलिए हम लोग क्या करते हैं

play09:08

अब एक और चीज में को बताना मैं आपको यह

play09:11

देखिए कि ठीक है भाई हम लोग सब्सक्राइब

play09:13

करें इससे यूज कर रहे हैं तो हम लेस

play09:15

डिफ़ाल्ट कर सकते हैं और हम को इस तरीके

play09:17

से नहीं जा रहा है तो कैसे जा सकते हैं

play09:18

अगर मैं लिस्ट ऑफ list-3 लिख दूं मैं इसको

play09:23

इंस्टाल इस कर दूंगा ठीक है तो यह भी

play09:25

लिस्ट बन जाएगा ठीक है अगर मैं टाइप ऑफ

play09:27

लिस्ट बंद तो यह भी एंटी लिस्ट होगा भी

play09:30

सिल्वर के लिए यहां पर देखिए यह प्ले

play09:32

लिस्ट अगर मैं लिस्ट ऑफ इसमें लिखकर वांट

play09:34

थम टो पत्रिका मुख्य वह कमा फाइव लिख दूं

play09:37

चलिए पर आ रहा है क्योंकि हेयर क्यों आ

play09:40

रहा है क्योंकि यहां पर बोल रहा है देखें

play09:42

यह डर क्यों रहा होगा कि इस तरह बला होना

play09:45

चाहिए जो एड्रेस में तो अगर मैं इसके अंदर

play09:49

ऐसे ड्रेस में डाल दूं

play09:51

ठीक है है और मैं इसी कट कर दो अब मैं

play09:55

पृथ्वी कर देता हूं इसको प्रिंट लिस्ट तो

play09:59

देखिए इसका आउट होगा 123 456 हर चीज को

play10:04

कंवर्ट कर सकते हैं इसको अब मैं दुसरे

play10:06

चीजों में कंवर्ट कर सकता हूं जिसमें मैं

play10:08

एक्सांपल को तो आई हो तो समझ लो लिस्ट का

play10:12

भी यूज कर सकते हैं

play10:15

चलिए यहां पर हम देखते हैं यह मैंने प्ले

play10:18

लिस्ट ऐसा बनाया है

play10:20

बनाया ऐसे भी बना सकते हैं भी बना सकते

play10:24

हैं ठीक है और यह

play10:28

चीज हम यह कर सकते हैं चलिए यहां पर

play10:32

यह यहां पर को

play10:36

12345 लिस्ट के ऊपर एक

play10:41

साइड में

play10:45

आपको लिस्ट कलेक्शन है तो मैं इसके अंदर

play10:50

करवाकर इसके अंदर ऑपरेशन अभिनेत्री करवा

play10:54

पाऊंगा इसके लिए उठी है अब चलिए यह देखते

play10:57

हैं ऑयल लिस्ट प्ले लिस्ट क्या है ए

play11:03

अच्छा ठीक है लिस्ट एमपी है ठीक है

play11:05

क्योंकि देखिए एंटी था बोलकर कुछ भी

play11:07

प्रिंट तय किया

play11:09

क्योंकि मैंने कर दिया और यहां पर लिख

play11:13

दिया

play11:14

1234 तो

play11:17

यहां पर

play11:20

मैं कुछ भी कर सकता हूं

play11:25

ठीक है यह तो यहां पर

play11:30

उसके बाद यह प्रिंटर करते ठीक है तो आप

play11:34

अप्लाई कर सकते हैं क्योंकि

play11:37

तो आप लोग यह समझ में आ गया हो यहां पर

play11:41

कुछ

play11:42

ठीक है ठीक है

play11:51

तो यहां पर आप

play11:53

जो भी लेंथ ली

play11:58

अगर समझो यहां पर फंक्शन होता है लिस्ट तो

play12:03

यहां पर देखिए आप यह सबसे बड़ा एलिमेंट

play12:05

लिस्ट में बोलता है और यह चीज बोल पाएगा

play12:08

जब कोई हाइड्रोजेनेशन लिमिट प्रॉपरली बोल

play12:10

पाएगा जब कोई शैटर होमोजीनस एलिमेंट की

play12:12

रहता है इंटीरियर हो गया सिस्टम हो गया

play12:15

ऐसे पेड़ के बारे में तो मैप्स ऑफ़

play12:17

लिबर्टी कर सकते हैं उसके बाद मीन ऑफ

play12:18

लिस्ट कर सकते हैं तो अलग-अलग ऑपरेशन आप

play12:21

डेफिनेटली कर सकते हैं कि मिनिमम वैली The

play12:23

One है तो ऐसे टाइप के जो पाइथन रिलेटिड

play12:26

फंक्शंस होते हैं इसमें अवेलेबल होता है

play12:29

कि आप यह सारे फंक्शंस बना सकते हैं अगर

play12:31

आपको यह नहीं बनाया था फॉलो लगाइए और

play12:33

बनाइए अपने हिसाब से कोड लिखिए और

play12:35

मैक्सिमम एनरोलमेंट स्मालेस्ट एलिमेंट यह

play12:38

सारा चीज प्रिंट कर पाएंगे तो चलिए कुछ और

play12:41

अमृत फंक्शन के बारे में देखते हैं और

play12:43

समझिए मेरे पास यह लिस्ट है मेरे पास यह

play12:46

लिस्ट है 1234 पांच पहला इन थिस फंक्शन

play12:49

जिसको हम लोग डिस्कस करेंगे इसको बोलते

play12:52

हैं पेड़ ठीक है अब लिस्ट में जब भी मैं

play12:55

ऐसा प्रेस करके रिलेटिव प्रेस करके डोंट

play12:57

स्टॉप दबाओ तो यहां पर आपको सारे का सारा

play13:00

इनबिल्ट फंक्शन दिख जाएगा अप एंड ए क्लियर

play13:03

है कॉपी कॉन्टैक्ट्स एंड साइंसेज पॉप

play13:06

रिवर्स तो यह सारे इन थिस फंक्शन को अमरुद

play13:08

देखेंगे अब चलिए हम लोग यह लिख देते है

play13:10

पेट में अप एंड में हम लोग यह कभी भी याद

play13:13

रखिए कोई भी फंक्शन का वह लिस्ट के अंदर

play13:16

है यह फंक्शन है धार्मिक उसका डेफिनेशन

play13:18

चाहिए यह ब्रैकेट से पहले जस्ट प्रेस करिए

play13:21

तो आपको पूरा का पूरा मिल जाएगा आप एंड

play13:24

ऑब्जेक्ट्स टू द एंड ऑफ द लिस्ट यह समझिए

play13:27

आप एंड ऑब्जेक्टिव्स एंड आफ्टर तो इसका

play13:29

मतलब आपको कोई भी लिस्ट में आइटम ऐड करना

play13:32

है आप एडिट कर दीजिए और यह हमेशा लास्ट

play13:35

में ऐड होगा तो अगर मैं यहां पर लिस्ट को

play13:37

तो यह देखिए मैंने डिसाइड किया तो यह हमको

play13:40

लिए ठीक है अब आपके पास ऐसी आई अभी होगा

play13:43

कि भाई मैं को दो-दो एलिमेंट्स ऐड करने तो

play13:45

मैं 22 एलिमेंट कैसे सेट करूं ठीक है तो

play13:47

यहां पर देखिए यह लेस जॉइंट में मैंने एक

play13:50

लिखा है अगेन विद द हेल्प ऑफ लिस्ट वहां

play13:53

पर जॉन और भाला अब यह तो एलिमेंट को मैं

play13:56

ऐड करने की कोशिश कर रहा हूं पर हमेशा याद

play13:58

कर यह वाला जो है यह ट्रेवल यह लिस्ट है

play14:01

तो अगर मैं इसको अप एंड करूं तो आप

play14:04

देखिएगा क्या दिखता है यहां पर ठीक है तो

play14:08

यहां देखिए यह हो गया 12345 क्रश बट यू

play14:11

हैव सेपरेट लिस्ट हुआ था ठीक है मैंने

play14:15

यहां पर दो वैल्यू दिया लिस्ट के अंदर बट

play14:17

आईएस ए सेपरेट कंप्लीट सेपरेट लिस्ट ठीक

play14:20

है यह नेकलेस बोलते हैं ना तो उसमें

play14:22

एक्चुअली ऐड हो गया बट आपको चाहता आप

play14:25

चाहते हैं कि भाई हम इसको सिंगल ई ऐड करें

play14:27

ठीक है मैं को ज्वाइन भी सप्रे प्यार करने

play14:29

वाला भी सेपरेटली याद करना है उसके बारे

play14:31

में बताऊंगा भी कैसे कर सकते हैं ठीक है

play14:33

अब यहां देखिए मैं यहां करूंगा इंसर्ट साल

play14:37

भर लो अगर मैं तो यह आइटम उठाना है हैं यह

play14:40

आइटम उठाना है तो मैं कैसे इंडेक्सिंग से

play14:43

करूंगा जिससे हो गया है लेस की ऑल Vivo

play14:46

12345 672 एसटीएफ व में जॉब करता हूं तो

play14:50

यहां उनको आएगा तो के जीरो

play14:54

12345 6

play14:57

में को यहां जानवर वाला अब मेरे को इसके

play15:02

अंदर से आइटम उठाना है तो फिर से मैं

play15:04

इंडक्शन करो करता हूं ज़ोर वक्त अगर

play15:06

समझाने को बाल उठाना है वही करूंगा तो यह

play15:09

मेरा आएगा वाला ठीक है तो यह काफी सिंपल

play15:12

और इजी है जहां पर आप नेस्टेड नैक्सेस

play15:15

परिनिष्ठित से भी आप एलिमेंट उठा सकते हैं

play15:18

ठीक है यह काफी इंपोर्टेंट चीज है अब चलिए

play15:21

हम नेक्स्ट वॉइस में जाते हैं तो यह हमारा

play15:23

लिस्ट समझिए

play15:25

नेक्स्ट यह हमारा लिस्ट इंडक्शन के बारे

play15:28

में बात कर दिया चलिए एक और चीज मैं बताता

play15:31

हूं कि हम क्या क्या कर सकते हैं अगर

play15:33

समझिए मेरे को एलिमेंट उठाना है एक वैल्यू

play15:38

से दूसरा वैल्यू तक कि एक वैल्यू से दूसरा

play15:41

वैल्यू तो मतलब एक रेंज उठाना है मेरे को

play15:44

तीन से ज्यादा मतलब तीन के एलिमेंट यह

play15:46

इंडेक्स के बाद जो सारे एलिमेंट उठाने तो

play15:49

इसमें मैं कैसे कर सकता हूं तो मैं इसमें

play15:51

इंडक्शन टेक्निक यूज करूंगा और इसे लेकिन

play15:54

टेक्निक को मैं बोलता हूं आप कोई नाम नहीं

play15:58

है बट इसमें हम लोग बेसिकली अगर एसिड डबल

play16:00

कॉलम लिखें ठीक है अब डबल को like और

play16:03

एकजुट कर दूं तो यहां पर देखिए पूरा लिस्ट

play16:05

दिख रहा है ठीक है डबल को लांघ यूज करता

play16:07

हूं तो अब यह डबल कोलर में मैं लेफ्ट साइड

play16:11

में डुबो सकता राइट साइड में उबाल आ सकता

play16:13

हूं समझा मैंने लेफ्ट साइड में डाल दिया

play16:15

सेकंड इंडेक्स से सारा एलिमेंट उठाना है

play16:18

तो मैं यहां पर देखिए 345 से सारा

play16:21

एलिमेंट्स आ गया 345 ठीक है 343

play16:25

इंसिडेंट एक्स्ट्रा पूरा लास्ट तक एलिमेंट

play16:28

देता है अगर संजय मैंने लास्ट का इंडेक्स

play16:30

डाल दिया सिक्स

play16:32

टुसन तो यहां पर देखिए यह जो सेंटर

play16:35

स्टार्ट हुआ है बट यह शिक्षक नहीं जाएगा

play16:39

16 - वन इंडक्शन जाएगा जो है आप फिट एंड

play16:42

एक्सपेक्ट तो इसलिए 3450 फ्री profile

play16:45

क्रश दिख जाता है हमेशा याद रखिए लिस्ट

play16:48

में यह कोई भी दूसरे जब हमें इंडक्शन

play16:51

टेक्निक यूज करेंगे रेंज के साथ ठीक है

play16:53

लास्ट जो एलिमेंट होता है वह हमेशा एंड

play16:56

माइनस वन होता है ठीक है तो अगर मैं आपसे

play16:58

दूर फेंका की आएगा ठीक है तो आप यह वाले

play17:01

इंजेक्शन टेक्निक्स एलिमेंट उठा सकता है

play17:03

तो आप लोगों को यह समझ में आया हूं अब

play17:06

नेक्स्ट द्वारा चीज है इंसर्ट अब आप देख

play17:09

सकते हैं कि आप एंड फंक्शन में क्या होता

play17:10

है कि एलिमेंट हमेशा लास्ट होता है बट

play17:14

मेरा यह कंडीशन होगा कि मेरे को प्रॉपरली

play17:16

सेकंड्स में 3डी में फॉर थे इंडिक्टमेंट

play17:18

कहां भी डालता हूं तो उसके लिए हम लोग यूज

play17:20

करते हैं इंसल्ट ठीक है एक इनसाइड फंक्शन

play17:23

है समझे मैंने यह लिस्ट बना देता हूं ठीक

play17:25

है

play17:26

कि यह मेरा लिस्ट है अब यहां पर ऑफिस

play17:29

लिखकर इस है मैं क्या करना चाहता हूं कि

play17:31

मैं से एक है नेक्स्ट मगर मैं लिस्ट

play17:33

स्टार्ट इंसर्ट में जाकर इसको ऑप्शन देखो

play17:35

तो गाइस अगर मेरे को सेकंड इंडेक्स में

play17:38

नायक डालना है तो मैं इसको बेसिकली लिस्ट

play17:41

2 मिनट मैं जाऊं तो देखो तो यहां पर देख

play17:44

सकता है आपको इंसर्ट ऑब्जेक्ट पॉइंट्स ठीक

play17:46

है तो यह अ नेशनल इंट्रस्ट का तो यहां मैं

play17:48

बोल रहा हूं कि मैं सेकंड इंडेक्स में

play17:50

नायक डाल दो तो मैं एकजुट कर देता हूं और

play17:52

उसके बाद में यह लिस्ट देख लो तो यहां पर

play17:55

आप देखिए तो इसका वैल्यू और है 124 सेकंड

play17:58

व थर्ड के बदले राम नायक दिख रहा है को

play18:00

ठीक है ऐसे ही मैं इंस्पेक्टर पेंट अप

play18:04

एंगर इन साइड में बस इतना ही सिंपल सा फाल

play18:07

डिफरेंस है कि आप एक स्पेसिफिक इंडेक्स

play18:10

में डाल पाए ठीक है वह आप इंसर्ट से कर

play18:13

सकते है पेट में डिप और लास्ट में ऐड होगा

play18:15

कि आपको इतना समझ में आ गया ठीक है यह हो

play18:18

गया इसका अब चलिए स्टेटमेंट देखते हैं अब

play18:20

यहां पर मैंने क्लिक डिफाइन किया है हमेशा

play18:23

याद रखिए अगर मैं लैपटॉप एंड यहां पर करूं

play18:26

तो क्या करूं एक पाठ को एक मैसेज डिफ़ाल्ट

play18:29

कर देगा और मैंने बोला था कि अगर ऐसा

play18:31

सीरियल नहीं चाहिए मेरे को और मिक्सचर

play18:34

प्रिंट एलिमेंट डालना है एट और नो तो मैं

play18:36

क्या करूंगा मैं इसको एक्सटेंड कर दूंगा

play18:39

अगर मैं उसको स्ट्रैट करूं और यहां पर

play18:41

प्रेस करूं स्पेसिफिक आर्टिस्ट बाय

play18:43

पेंटिंग एलिमेंट फ्रॉम बाइबल तो अगर मैं

play18:46

यहां पर आफ ट्रैवल भी डालूं तो क्या करेगा

play18:48

सेपरेटली फॉर एलिमेंट करेगा तो यह रहा

play18:51

एक्सटेंड थ्रू देखिए मेन लीड करता हूं

play18:53

लिस्ट का तो यहां देख सकता है 12345

play18:57

680 एलिमेंट हुआ है ठीक है अगर मैं समझा

play19:01

यहां से एकजुट करके मैं यूज करता है क्या

play19:05

होता लिस्ट तरफ

play19:08

अच्छा ठीक है वॉर्न इन लाइट को मनाए

play19:11

त्यौहार

play19:13

प्रिंट कर देता तो यह देखिए आपको से

play19:16

प्रीति नेस्टेड लिस्ट

play19:18

प्ले

play19:19

लिस्ट

play19:21

कर सकते हैं यहां पर मैंने क्लिक

play19:25

कर सकते हैं ठीक है आप यूज करके यूज कर

play19:30

सकते हैं तो आप यह चीज

play19:33

याद रखिए शंखा इंटरनल करें और

play19:39

एक और चीज दिखा देता आपको यह लिस्ट प्ले

play19:44

करो यहां पर देखिए

play19:47

लिस्ट लिस्ट

play19:50

बेसिकली

play19:51

यह परिसंघ

play19:55

ने ऑपरेशन जैसा इसलिए नहीं कर पाया इसलिए

play20:00

मैथमेटिकल ऑपरेशंस के बारे में डिस्कस

play20:02

करूं

play20:05

एलिमेंट को में ऐसा नहीं है अच्छा ठीक है

play20:09

यहां पर क्या हो रहा है बेसिकली यह पांच

play20:11

बार टैप एंड होते जा रहा है कि इस सेकंड

play20:14

टाइम यह थर्ड टाइम यह फोर्थ लाइन यह

play20:16

सप्ताह तो पांच बार पेंट हो गया है जब मैं

play20:19

लेफ्ट साइड करवा ठीक है और उसके बाद हम

play20:22

लोग डिस्कशन करते हैं यह थोड़े

play20:24

मल्टिप्लिकेशन वाले ऑपरेशन अगर मैं इसमें

play20:27

भी करूं तब भी नहीं होगा अगर आएगा बिकॉज

play20:30

इट्स नॉट सपोर्ट ठीक है लिस्ट को वह यह

play20:34

डिविजन भी ऑपरेशन नहीं आपको ऐसा लगेगा कि

play20:36

बाइक मैं पूरे के पूरे एलिमेंट डिवाइड हो

play20:38

गए नहीं ऐसा नहीं है आपको फॉलो लिखना

play20:40

पड़ेगा हर एक आइटम बनाना पड़ेगा उसके बाद

play20:43

उसको हर एक आइटम लेना पड़ेगा उसको डिवाइड

play20:46

कर सकते हैं जैसे मैं एक एग्जांपल दिखाता

play20:48

हूं आपको

play20:49

यहां पर मैं लिख दूंगा दौरान एब्सलूट्स और

play20:53

यहां पर निकायों में

play20:55

डिवाइड अगर ऐसा कर दोगे तो

play20:59

सब्सक्राइब बटन पर क्लिक

play21:05

कर देता है

play21:08

में का पेस्ट कर देता है ठीक है चलिए और

play21:11

मेथड देखते हैं पॉप मेथड टॉप मेथड में कुछ

play21:13

नहीं है बहुत ही सिंपल है अगर समझो यह

play21:15

मेरा लिस्ट है यह मेरा लिस्ट है अगर मेरे

play21:18

रिलेटिव व्हाट्सएप लडूंगा तो सबसे लास्ट

play21:20

एलिमेंट को पॉज कर देगा तो आप ठीक है अब

play21:24

उसके बाद अगर मैं लेस कि देखूं तो वह

play21:26

अपडेट भी हो जाता है ठीक है तो यह कैसा

play21:29

ऑपरेशन है जिस मेथड मामलों कॉल कर रहे हैं

play21:32

वह लिस्ट को भी अपडेट कर रहा है तो इसलिए

play21:34

यहां पर लिखा है लेस टिप और यह लिस्ट के

play21:36

देखिए आप वहां पर पेंट हो रहा है इसके

play21:39

अंदर बाई डिफ़ॉल्ट अगर आप कुछ वैल्यू ना

play21:40

दें तो हम लोग यहां पर इंडेक्स सब्सक्राइब

play21:42

कर सकता है कौन सा स्पेसिफिक इंडेक्स

play21:45

एलिमेंट आपको उठाना है मैं अगर समझें तो

play21:47

यह थर्ड लाइन उठाना है यह वाला 2012 तो

play21:50

मैं यहां से कंटक दे दूंगा और वह वाला

play21:53

एलिमेंट उठ जाएगा और उसके साथ टेस्टी भी

play21:55

अपडेट हो जाएगा तो यह

play21:58

अनधा ऐसे बहुत सारे में

play22:01

क्या होता है कि आपको करना है ठीक है अगर

play22:05

मेरे को भी करना पड़े तो मैं उस तरीके से

play22:08

गैस को स्लो करूंगा और मैं देखूंगा कि भाई

play22:11

अगर मेरा यह टॉप के में कैसे कर सकता हूं

play22:13

ठीक है यह सारा चीज है अब यहां पर मैं यह

play22:17

दो चीज आपके ऊपर छोड़ देता हूं एक है

play22:19

अकाउंट फ्लू इंडेक्स अनुसार चीज मैंने

play22:22

डिस्क्रिप्शन कर चुका हूं तो आई हॉप आप

play22:24

लोगों को यह रिश्ता वीडियो अच्छा लगा

play22:26

नेक्स्ट वाले ट्युटोरियल में हम लोग सेट

play22:28

डिक्शनरी से यह सब देखेंगे आर्ट एंड हैव ए

play22:31

ग्रेट डे है अगर वीडियो अच्छा लगा

play22:33

डेफिनेटली सब्सक्राइब करें का यह शेयर

play22:35

करिएगा सबसे क्योंकि मैं हिंदी में पड़ा

play22:38

रहा हूं और मुझे बहुत ही एक साइड में

play22:39

दिल्ली में पढ़ाने के लिए पहली बात

play22:41

यूट्यूब से पढ़ा रहा हूं नाइट में रीयल

play22:43

लाइफ में भी इंग्लिश में पढ़ाता हूं ठीक

play22:45

है तो डेफिनेटली सपोर्ट करेगा थैंक्यू

play22:47

अंडा बाय हैव ए ग्रेट डे

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
Python ListsProgramming TutorialData StructuresList OperationsIndexing TechniquesNested ListsList FunctionsSequence OperationsCode ExamplesTechnical Learning
¿Necesitas un resumen en inglés?