Tutorial 6- Python List And Its Inbuilt Function In Hindi
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
😀 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.
📝 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.
🔍 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.
📚 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.
🛠️ 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
💡List
💡Data Structure
💡Indexing
💡Element
💡Functionality
💡Type
💡String
💡Mutable
💡Immutable
💡Nested List
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
हेलो गाइस माइ नेम इज क्वेश्चन है कल
वेलकम टू माय YouTube चैनल सो गाइस हम लोग
पाइथन का प्लेलिस्ट करती हूं करेंगे और
आपके वीडियो में हम एक इन प्रिंट डाटा
स्ट्रक्चर पाइथन में जैसे लिस्ट उसके बारे
में डिस्कशन करने वाले हैं यह कहां से
इंपॉर्टेंट डाटा स्ट्रक्चर है क्योंकि
इसको यूज करते हैं बहुत सारे फंक्शनैलिटीज
इंप्लिमेंट कर सकते हैं तो इतिहास
डेफिनेटली इंपॉर्टेंट कि आपको इस इन बी
डाटा स्ट्रक्चर के बारे में पता रहे हैं
अभी तक मैंने टोटली फाइट टाइल्स डाल चुका
हूं और प्रीवियसली मैंने जो इन डाटा
स्ट्रक्चर के बारे में एक्सप्लेन किया है
वह है नंबर है नंबर मेथड और इस वीडियो में
हम फोकस करेंगे और लिस्ट के बारे में बट
उससे पहले में इस ट्रिक्स के बारे में भी
थोड़ा कुछ बता दूंगा इसमें क्योंकि हम को
थोड़े टर्मिनोलॉजिस पता लगाने पड़ेंगे
जहां पर लिस्ट का एक प्रॉपर्टी होता है
ड्यूटेबल ठीक है तो चलिए पहली बात तो हम
लोग डिस्कशन करते की लिस्ट होता क्या है
ठीक है तो यहां पर यह सारा का सारा
मटेरियल मैंने प्रोवाइड कर दूंगा पूरे
डिस्क्रिप्शन में विटामिन ए में अपलोड कर
देता हूं आप यहां से देख सकते हैं तो चलिए
हम लोग समझते कि क्या है लिस्ट इसे डाटा
स्ट्रक्चर इन पाइथन ड्यूटेबल और चेंजेबल
मिठाई वोट को याद रखिए ड्यूटेबल और
चेंजेबल ऑडियंस आफ एलिमेंट्स विच एलिमेंट
और वैल्यूज इंसाइड आफ लिस्ट्स ऑल आइटम्स
जस्ट ए स्ट्रिंग डिफाइंड एस कैरेक्टर
बिटवीन कोट्स लिस्ट फ्रॉम डिफरेंट यूजेस
फॉर योर ब्राइट चली तो एक्सप्लेन कर देता
हूं कि क्या चीज के बारे में हम यहां
डिस्कशन कर रहे हैं और बहुत इंपोर्टेंट
पॉइंट है जो हम लोग ड्यूटेबल है
थे वॉयसेस इन ड्यूटेबल ठीक है तो यह वर्ड
हमलों को समझने के लिए बहुत ही जरूरी यह
समझना चाहिए कि हम पहले से इंस्टोल का
एक्सांपल अब मैं एक्स्ट्रा डिफाइन कर देता
हूं यहां पर मैं लिख देता हूं प्रवेश और
मैं आप प्रिंट कर देता हूं तृषा
5001 ठीक है और मैं यहां भी यह भी देख
लेता हूं कि टाइप ऑफ स्टीवन किया है तो
यहां एकजुट करता हूं तो यह आप देख सकते
हैं कि मेरा स्टीव वैल्यू कृष्ण आ रहा है
और इसका टाइप है एचटी चाणक्य स्ट्रिंग
डाटा टाइप करें ठीक है अब समझिए मैं यही
वाले वेरिएबल को के लिए वैरी बन गया
एडजस्ट में डबल अब यह सीरियल को वैल्यू
कुछ और साइन कर देता हूं जिससे इसका टूटे
या दूसरा स्ट्रीम में साइन कर देता हूं
यहां पर हम बोलते हैं नायरा ठीक है मेरा
सर ने मैं अब मैं इसको प्रिंट कर देता हूं
इसलिए और वन अब इसका आउट क्या होगा आप
क्लीयरली बता पाएंगे कि उक्त सभी एक चीज
होने वाला है यहां पर की जो इस में काव्य
जो क्रस्ट पहले अपना एक होने वाला है तो
हम यहां एकजुट कर देते हैं तो यहां पर आप
देखिए यहां पर नायक आ रहा है ठीक है तो आप
तो बहुत ही क्लियर है कि स्ट्रिंग का
वॉल्यूम कंप्लीट ही रिप्लेस डेफिनेटली कर
पाते हैं ठीक है अब यह चीज हो गया आपसे तो
नेक्स्ट चीज हम एक और चीज देखते हैं यहां
पर चले मैं यह सेल को पूरा डिलीट कर देता
हूं और डिलीट भी नहीं करता है नया सेल बना
देता हूं चलिए अब यहां पर मैं लिखता हूं
देखिए बहुत ही इंपोर्टेंट चीज है मैं जो
लिख रहा हूं यहां पर अगर मैं को star123
जो है नायक ठीक है यह एक पूरा कलेक्शन ऑफ
कलेक्शन ऑफ डायरेक्टर्स है ठीक है अगर मैं
स्ट्रिंग के अंदर बोलूं क्या आइटम्स
प्रेसिडेंट होते हैं आइटम्स मतलब इसमें
आइटम्स क्या है पूरा बोर्ड को में एक आइटम
लेंगे नहीं सिंह के अंदर आइटम होते हैं यह
कैरेक्टर्स ठीक है यह कैरेक्टर्स यह
कैरेक्टर और यह कैरेक्टर यह कैरेक्टर यह
क्या है ठीक है
एनकांउटर अलग ए कैरक्टर आफ कार्यालय क्या
हम इस कैरेक्टर को एक उतर पाएंगे तो बहुत
ही सिंपल तरीके से एक्सेस कर पाएंगे और
समझा मैं लिख देता हूं यहां पर इंडेक्सिंग
हुए 20 मिनट तो अगर मैं जीरो एलिमेंट लिख
दूं ठीक है तू क्या होगा अगर मैं इसको कट
कर देता हूं तो आप सोचिए क्या आउटपुट आएगा
ठीक है इसका ऑफिस लिए भागना तो यहां पर
देखिए बना रहा है बहुत ही क्लियर आ रहा है
ठीक है तो इसका मतलब अगर मेरे को फर्स्ट
एलिमेंट यहां से उठाना है तो मैं
इंडेक्सिंग टेक्निक से उसको उठा सकता हूं
ठीक है अगर समझो मेरे को आई उठाना है तो
क्या होगा इंडक्शन 012 हमेशा याद रखे
पाइथन में इंडक्शन 0 से स्टार्ट होता है
तो मैं बिट्टू करो तो यहां पर आया गया अब
चलिए हम लोग को पता चल गया कि हम लोग एक
स्पेसिफिक आइटम उठा सकते हैं और बेसिकली
ट्वीट कर सकता डिस्प्ले कर सकते हैं जितना
पर क्लियर हो गया होगा अब मैं नेक्स्ट जीत
इसने यह करूंगा कि भाई मेरे को आप एक
एलिमेंट डालना है चलो मैं एक्स्ट्रा ऑइल
ऐड कर देता हूं इसकी टू में यहां पर क्या
मैं आइटम को आसान कर सकता आइटम सांग कि
मैं आज के बदले कुछ और वैल्यू डाल सकता
हूं क्या आई के बदले में क्या डाल सकता है
या के डाल सकता है कुछ भी एलिमेंट डाल
सकता हूं इसमें तो अगर मैं इसको
एग्जिक्यूट करूं तो यहां दिखेगा आपको
गहराएगा एसटीआर ऑब्जेक्ट डर नॉट सपोर्ट
आइटम साइंटिफिक हंसी इंपोर्टेंट है इसमें
आइटम है कैरेक्टर्स और उसके बदले में कुछ
भी नहीं डाल सकता वहीं एक चीज बोल रहा है
बे नॉट सपोर्ट आइटम सांग में इसका मतलब
अगर आप इस टाइम का वैल्यू डिसाइड कर देते
हैं वह उसके अंदर का आइटम्स आप चेंज नहीं
कर पाएंगे तो इसीलिए हम लोग इसमें बोलेंगे
कि स्टफिंग आ रिन्यूएबल यहां पर में कमेंट
लिख देता हूं फिर इंतजार इन उर टेबल बहुत
ही इंपोर्टेंट चीज है बहुत इंपोर्टेंट चीज
है अब आपको पता चल गया
तो उसमें चेंज कर पाएंगे ठीक है तो यह
कनेक्शन डाटा
इन टेबल चेंज
चेंज कर सकते है बट इट इज नॉट ड्यूटेबल
ठीक है यह हमेशा याद रखिए चलिए अब स्क्रीन
का आईडिया आपको आ गया स्ट्रीट में काफी इन
थिस फंक्शन भी होते हैं जो मैं प्रॉब्लम
वीडियो में डिवाइड कर दूंगा बट हम समझते
कि लिस्ट के बारे में डिस्कशन कर रहे हैं
तो यह लिस्ट को हम लोग कैसे डिफाइन करते
हैं जैसे बोला मैं स्ट्रिंग को हम डबल कोट
यूज करते हैं लिस्ट को हम एंगुलर
बेनेफिट्स मतलब स्क्वेयर ब्रैकेट्स यूज
करते हैं गूलर ने बंगलौर हम लोग डिक्शनरी
और सेट वह सब जगह में यूज करेंगे अगर मैं
साइन अप बैक इट्स लिख दूं और यहां पर मैं
लिख दूं टाइप ऑफ दिस देखिए अभी एमपी लिस्ट
भी है तो यह दिखाएगा कि यह ऑब्जेक्ट जो भी
यह बाहरी हमलों में अंदर लिखा है इट इज द
लिस्ट क्यों यह यौवन से बेसिकली रफ पता
लगा पा रहा है The Amazing
ऑस्कर रैकेट अगर समझिए लिस्ट डिफाइन करना
है यह तो एमपी लिस्ट है ठीक है मैं यहां
पर डिवाइड कर देता हूं एक वैल्यू इसे
इलेक्ट्रिक का यह टेस्टी मत लिखिएगा टेस्ट
क्वाइट क्लियर है जो लिस्ट basic क्लास है
जो लिस्ट बनाता है उस तरीके से हम लोग
डिफरेंट कर सकते हैं मैं यहां का यात्रा
करूंगा वन कमेंट टो कनेक्ट विद कामुक हो
ठीक है तो यहां लिख देता हूं मैं लेस ठीक
ठीक है तो यहां पर मैं जो प्ले लिस्ट लिख
दिया और हमेशा याद रखिए इट इज नॉट नेसेसरी
कि आप एक ही टाइप का डेटा ही डाले आप इस
ट्रिक भी डाल सकते हैं ठीक है घूमो जीनियस
कलेक्शन होता है लिस्ट के अंदर ठीक है मैं
यहां पर लिख दूंगा हेलो सब्सक्राइब माय
चैनल कुछ भी लिख दूंगा मैं सेंटेंस भी लिख
सकता हूं कुछ भी अगर मैं फ्रेंड लिस्ट कर
देता हूं तो यहां देखिए आपको लिस्ट दिखेगा
वह ठीक है यह चीज बहुत ही क्लियर है आपको
अब दूसरा चीज यह है अगर मैं इसके अंदर के
लिए प्रिंट हो गया अब मैं लिख देता हूं और
लास्ट लीफ
Hero अब एक हमको आइटम उठाना है ठीक है मैं
लिंक दे तो प्रिंट आफ इलेक्ट्रोंस जीरो
इसका मतलब क्या है फर्स्ट इंडेक्सेस में
फर्स्ट इन नेक्स्ट 302 सबसे
ज़ोर
ठीक है अगर मैं पर हिस्ट्री ऑफ़ बरोदा रहा
हूं तो ऑफिस मेरा वैल्यू बानो का यज्ञ
समझिए यहां पर फोर्थ इंडेक्स फंड जुटाना
चाहता हूं तो यह बेसिकली यह जीरो 1234 पाठ
दूंगा तो यहां पर मैं को हेलो आ रहा है वह
ठंडक में उठा देता हूं तो इसका वैल्यू
होगा करें ठीक है यह बहुत ही सिंपल तरीके
से आप रिट्वीट कर पा रहे हैं जैसे हम लोग
फिल्में कर पा रहे हैं और इसमें आइटम्स
क्या है यह जो वैल्यूज हम लोग कॉपर करके
लिख रहे हैं यह हर एक आइटम है आइटम
होमोजीनस हेटेरोजेनियस दोनों हो सकता है
कुछ भी आप डाल सकते अंदर ठीक है यह बहुत
इंपोर्टेंट चीज पसंद स्टंट करने के लिए
अगर हम यूटिलिटी का बात करें गैस करी कि
ड्यूटेबल होता है कि नहीं है ठीक है
कि आप देख लिया है यह प्रिंट टेस्टी फॉर
जब मैं प्रिंट कर रहा हूं चलिए मैं यहां
पर प्रिंट कर रहा हूं टेस्टी फोर तो आपको
दिया कि भाई कृष्ण दिख रहा है चलो अब हम
क्या करते हैं लिस्ट फॉर के बदले कुछ लिख
देता है जिससे मैं लिख देता हूं नायक तो
यहां पर क्या कर रहा हूं मैंने यह फोर्थ
वाले एलिमेंट के बदले मैं नायक लिख रहा
हूं तो राधे कृष्ण को नासिक से रिप्लेस कर
देगा उसके बाद अगर मैं प्रिंट करूं तो यह
देखिए नायक हो रहा है दैट बेसिकली लिस्ट
इस न्यू टेबल और यही डेफिनेशन मैं आपको
दिखाने कोशिश कर रहा था कि ड्यूटेबल और
चेंजेबल चेंजेबल तो डेफिनेटली मैं इसको
ऐसे भी चेंज कर पाऊंगा और सीक्वेंस आफ
एलिमेंट्री आ सकता है कुछ भी आ सकता है
ठीक है तो आई हॉप आप लोगों को इतना समझ
में आया ठीक है और लिस्ट आफ यूसेज बहुत ही
ज्यादा है गई ठीक है बहुत सारे तरीके से
आपको डाटा लाना है उसका प्ले लिस्ट कंवर्ट
करते हैं यह सब चीज हम लोग देखेंगे आगे
जैसे अमरुद जा रहे हैं ठीक है चलिए अब
इतना तो हो गया चलिए हम लोग क्या करते हैं
अब एक और चीज में को बताना मैं आपको यह
देखिए कि ठीक है भाई हम लोग सब्सक्राइब
करें इससे यूज कर रहे हैं तो हम लेस
डिफ़ाल्ट कर सकते हैं और हम को इस तरीके
से नहीं जा रहा है तो कैसे जा सकते हैं
अगर मैं लिस्ट ऑफ list-3 लिख दूं मैं इसको
इंस्टाल इस कर दूंगा ठीक है तो यह भी
लिस्ट बन जाएगा ठीक है अगर मैं टाइप ऑफ
लिस्ट बंद तो यह भी एंटी लिस्ट होगा भी
सिल्वर के लिए यहां पर देखिए यह प्ले
लिस्ट अगर मैं लिस्ट ऑफ इसमें लिखकर वांट
थम टो पत्रिका मुख्य वह कमा फाइव लिख दूं
चलिए पर आ रहा है क्योंकि हेयर क्यों आ
रहा है क्योंकि यहां पर बोल रहा है देखें
यह डर क्यों रहा होगा कि इस तरह बला होना
चाहिए जो एड्रेस में तो अगर मैं इसके अंदर
ऐसे ड्रेस में डाल दूं
ठीक है है और मैं इसी कट कर दो अब मैं
पृथ्वी कर देता हूं इसको प्रिंट लिस्ट तो
देखिए इसका आउट होगा 123 456 हर चीज को
कंवर्ट कर सकते हैं इसको अब मैं दुसरे
चीजों में कंवर्ट कर सकता हूं जिसमें मैं
एक्सांपल को तो आई हो तो समझ लो लिस्ट का
भी यूज कर सकते हैं
चलिए यहां पर हम देखते हैं यह मैंने प्ले
लिस्ट ऐसा बनाया है
बनाया ऐसे भी बना सकते हैं भी बना सकते
हैं ठीक है और यह
चीज हम यह कर सकते हैं चलिए यहां पर
यह यहां पर को
12345 लिस्ट के ऊपर एक
साइड में
आपको लिस्ट कलेक्शन है तो मैं इसके अंदर
करवाकर इसके अंदर ऑपरेशन अभिनेत्री करवा
पाऊंगा इसके लिए उठी है अब चलिए यह देखते
हैं ऑयल लिस्ट प्ले लिस्ट क्या है ए
अच्छा ठीक है लिस्ट एमपी है ठीक है
क्योंकि देखिए एंटी था बोलकर कुछ भी
प्रिंट तय किया
क्योंकि मैंने कर दिया और यहां पर लिख
दिया
1234 तो
यहां पर
मैं कुछ भी कर सकता हूं
ठीक है यह तो यहां पर
उसके बाद यह प्रिंटर करते ठीक है तो आप
अप्लाई कर सकते हैं क्योंकि
तो आप लोग यह समझ में आ गया हो यहां पर
कुछ
ठीक है ठीक है
तो यहां पर आप
जो भी लेंथ ली
अगर समझो यहां पर फंक्शन होता है लिस्ट तो
यहां पर देखिए आप यह सबसे बड़ा एलिमेंट
लिस्ट में बोलता है और यह चीज बोल पाएगा
जब कोई हाइड्रोजेनेशन लिमिट प्रॉपरली बोल
पाएगा जब कोई शैटर होमोजीनस एलिमेंट की
रहता है इंटीरियर हो गया सिस्टम हो गया
ऐसे पेड़ के बारे में तो मैप्स ऑफ़
लिबर्टी कर सकते हैं उसके बाद मीन ऑफ
लिस्ट कर सकते हैं तो अलग-अलग ऑपरेशन आप
डेफिनेटली कर सकते हैं कि मिनिमम वैली The
One है तो ऐसे टाइप के जो पाइथन रिलेटिड
फंक्शंस होते हैं इसमें अवेलेबल होता है
कि आप यह सारे फंक्शंस बना सकते हैं अगर
आपको यह नहीं बनाया था फॉलो लगाइए और
बनाइए अपने हिसाब से कोड लिखिए और
मैक्सिमम एनरोलमेंट स्मालेस्ट एलिमेंट यह
सारा चीज प्रिंट कर पाएंगे तो चलिए कुछ और
अमृत फंक्शन के बारे में देखते हैं और
समझिए मेरे पास यह लिस्ट है मेरे पास यह
लिस्ट है 1234 पांच पहला इन थिस फंक्शन
जिसको हम लोग डिस्कस करेंगे इसको बोलते
हैं पेड़ ठीक है अब लिस्ट में जब भी मैं
ऐसा प्रेस करके रिलेटिव प्रेस करके डोंट
स्टॉप दबाओ तो यहां पर आपको सारे का सारा
इनबिल्ट फंक्शन दिख जाएगा अप एंड ए क्लियर
है कॉपी कॉन्टैक्ट्स एंड साइंसेज पॉप
रिवर्स तो यह सारे इन थिस फंक्शन को अमरुद
देखेंगे अब चलिए हम लोग यह लिख देते है
पेट में अप एंड में हम लोग यह कभी भी याद
रखिए कोई भी फंक्शन का वह लिस्ट के अंदर
है यह फंक्शन है धार्मिक उसका डेफिनेशन
चाहिए यह ब्रैकेट से पहले जस्ट प्रेस करिए
तो आपको पूरा का पूरा मिल जाएगा आप एंड
ऑब्जेक्ट्स टू द एंड ऑफ द लिस्ट यह समझिए
आप एंड ऑब्जेक्टिव्स एंड आफ्टर तो इसका
मतलब आपको कोई भी लिस्ट में आइटम ऐड करना
है आप एडिट कर दीजिए और यह हमेशा लास्ट
में ऐड होगा तो अगर मैं यहां पर लिस्ट को
तो यह देखिए मैंने डिसाइड किया तो यह हमको
लिए ठीक है अब आपके पास ऐसी आई अभी होगा
कि भाई मैं को दो-दो एलिमेंट्स ऐड करने तो
मैं 22 एलिमेंट कैसे सेट करूं ठीक है तो
यहां पर देखिए यह लेस जॉइंट में मैंने एक
लिखा है अगेन विद द हेल्प ऑफ लिस्ट वहां
पर जॉन और भाला अब यह तो एलिमेंट को मैं
ऐड करने की कोशिश कर रहा हूं पर हमेशा याद
कर यह वाला जो है यह ट्रेवल यह लिस्ट है
तो अगर मैं इसको अप एंड करूं तो आप
देखिएगा क्या दिखता है यहां पर ठीक है तो
यहां देखिए यह हो गया 12345 क्रश बट यू
हैव सेपरेट लिस्ट हुआ था ठीक है मैंने
यहां पर दो वैल्यू दिया लिस्ट के अंदर बट
आईएस ए सेपरेट कंप्लीट सेपरेट लिस्ट ठीक
है यह नेकलेस बोलते हैं ना तो उसमें
एक्चुअली ऐड हो गया बट आपको चाहता आप
चाहते हैं कि भाई हम इसको सिंगल ई ऐड करें
ठीक है मैं को ज्वाइन भी सप्रे प्यार करने
वाला भी सेपरेटली याद करना है उसके बारे
में बताऊंगा भी कैसे कर सकते हैं ठीक है
अब यहां देखिए मैं यहां करूंगा इंसर्ट साल
भर लो अगर मैं तो यह आइटम उठाना है हैं यह
आइटम उठाना है तो मैं कैसे इंडेक्सिंग से
करूंगा जिससे हो गया है लेस की ऑल Vivo
12345 672 एसटीएफ व में जॉब करता हूं तो
यहां उनको आएगा तो के जीरो
12345 6
में को यहां जानवर वाला अब मेरे को इसके
अंदर से आइटम उठाना है तो फिर से मैं
इंडक्शन करो करता हूं ज़ोर वक्त अगर
समझाने को बाल उठाना है वही करूंगा तो यह
मेरा आएगा वाला ठीक है तो यह काफी सिंपल
और इजी है जहां पर आप नेस्टेड नैक्सेस
परिनिष्ठित से भी आप एलिमेंट उठा सकते हैं
ठीक है यह काफी इंपोर्टेंट चीज है अब चलिए
हम नेक्स्ट वॉइस में जाते हैं तो यह हमारा
लिस्ट समझिए
नेक्स्ट यह हमारा लिस्ट इंडक्शन के बारे
में बात कर दिया चलिए एक और चीज मैं बताता
हूं कि हम क्या क्या कर सकते हैं अगर
समझिए मेरे को एलिमेंट उठाना है एक वैल्यू
से दूसरा वैल्यू तक कि एक वैल्यू से दूसरा
वैल्यू तो मतलब एक रेंज उठाना है मेरे को
तीन से ज्यादा मतलब तीन के एलिमेंट यह
इंडेक्स के बाद जो सारे एलिमेंट उठाने तो
इसमें मैं कैसे कर सकता हूं तो मैं इसमें
इंडक्शन टेक्निक यूज करूंगा और इसे लेकिन
टेक्निक को मैं बोलता हूं आप कोई नाम नहीं
है बट इसमें हम लोग बेसिकली अगर एसिड डबल
कॉलम लिखें ठीक है अब डबल को like और
एकजुट कर दूं तो यहां पर देखिए पूरा लिस्ट
दिख रहा है ठीक है डबल को लांघ यूज करता
हूं तो अब यह डबल कोलर में मैं लेफ्ट साइड
में डुबो सकता राइट साइड में उबाल आ सकता
हूं समझा मैंने लेफ्ट साइड में डाल दिया
सेकंड इंडेक्स से सारा एलिमेंट उठाना है
तो मैं यहां पर देखिए 345 से सारा
एलिमेंट्स आ गया 345 ठीक है 343
इंसिडेंट एक्स्ट्रा पूरा लास्ट तक एलिमेंट
देता है अगर संजय मैंने लास्ट का इंडेक्स
डाल दिया सिक्स
टुसन तो यहां पर देखिए यह जो सेंटर
स्टार्ट हुआ है बट यह शिक्षक नहीं जाएगा
16 - वन इंडक्शन जाएगा जो है आप फिट एंड
एक्सपेक्ट तो इसलिए 3450 फ्री profile
क्रश दिख जाता है हमेशा याद रखिए लिस्ट
में यह कोई भी दूसरे जब हमें इंडक्शन
टेक्निक यूज करेंगे रेंज के साथ ठीक है
लास्ट जो एलिमेंट होता है वह हमेशा एंड
माइनस वन होता है ठीक है तो अगर मैं आपसे
दूर फेंका की आएगा ठीक है तो आप यह वाले
इंजेक्शन टेक्निक्स एलिमेंट उठा सकता है
तो आप लोगों को यह समझ में आया हूं अब
नेक्स्ट द्वारा चीज है इंसर्ट अब आप देख
सकते हैं कि आप एंड फंक्शन में क्या होता
है कि एलिमेंट हमेशा लास्ट होता है बट
मेरा यह कंडीशन होगा कि मेरे को प्रॉपरली
सेकंड्स में 3डी में फॉर थे इंडिक्टमेंट
कहां भी डालता हूं तो उसके लिए हम लोग यूज
करते हैं इंसल्ट ठीक है एक इनसाइड फंक्शन
है समझे मैंने यह लिस्ट बना देता हूं ठीक
है
कि यह मेरा लिस्ट है अब यहां पर ऑफिस
लिखकर इस है मैं क्या करना चाहता हूं कि
मैं से एक है नेक्स्ट मगर मैं लिस्ट
स्टार्ट इंसर्ट में जाकर इसको ऑप्शन देखो
तो गाइस अगर मेरे को सेकंड इंडेक्स में
नायक डालना है तो मैं इसको बेसिकली लिस्ट
2 मिनट मैं जाऊं तो देखो तो यहां पर देख
सकता है आपको इंसर्ट ऑब्जेक्ट पॉइंट्स ठीक
है तो यह अ नेशनल इंट्रस्ट का तो यहां मैं
बोल रहा हूं कि मैं सेकंड इंडेक्स में
नायक डाल दो तो मैं एकजुट कर देता हूं और
उसके बाद में यह लिस्ट देख लो तो यहां पर
आप देखिए तो इसका वैल्यू और है 124 सेकंड
व थर्ड के बदले राम नायक दिख रहा है को
ठीक है ऐसे ही मैं इंस्पेक्टर पेंट अप
एंगर इन साइड में बस इतना ही सिंपल सा फाल
डिफरेंस है कि आप एक स्पेसिफिक इंडेक्स
में डाल पाए ठीक है वह आप इंसर्ट से कर
सकते है पेट में डिप और लास्ट में ऐड होगा
कि आपको इतना समझ में आ गया ठीक है यह हो
गया इसका अब चलिए स्टेटमेंट देखते हैं अब
यहां पर मैंने क्लिक डिफाइन किया है हमेशा
याद रखिए अगर मैं लैपटॉप एंड यहां पर करूं
तो क्या करूं एक पाठ को एक मैसेज डिफ़ाल्ट
कर देगा और मैंने बोला था कि अगर ऐसा
सीरियल नहीं चाहिए मेरे को और मिक्सचर
प्रिंट एलिमेंट डालना है एट और नो तो मैं
क्या करूंगा मैं इसको एक्सटेंड कर दूंगा
अगर मैं उसको स्ट्रैट करूं और यहां पर
प्रेस करूं स्पेसिफिक आर्टिस्ट बाय
पेंटिंग एलिमेंट फ्रॉम बाइबल तो अगर मैं
यहां पर आफ ट्रैवल भी डालूं तो क्या करेगा
सेपरेटली फॉर एलिमेंट करेगा तो यह रहा
एक्सटेंड थ्रू देखिए मेन लीड करता हूं
लिस्ट का तो यहां देख सकता है 12345
680 एलिमेंट हुआ है ठीक है अगर मैं समझा
यहां से एकजुट करके मैं यूज करता है क्या
होता लिस्ट तरफ
अच्छा ठीक है वॉर्न इन लाइट को मनाए
त्यौहार
प्रिंट कर देता तो यह देखिए आपको से
प्रीति नेस्टेड लिस्ट
प्ले
लिस्ट
कर सकते हैं यहां पर मैंने क्लिक
कर सकते हैं ठीक है आप यूज करके यूज कर
सकते हैं तो आप यह चीज
याद रखिए शंखा इंटरनल करें और
एक और चीज दिखा देता आपको यह लिस्ट प्ले
करो यहां पर देखिए
लिस्ट लिस्ट
बेसिकली
यह परिसंघ
ने ऑपरेशन जैसा इसलिए नहीं कर पाया इसलिए
मैथमेटिकल ऑपरेशंस के बारे में डिस्कस
करूं
एलिमेंट को में ऐसा नहीं है अच्छा ठीक है
यहां पर क्या हो रहा है बेसिकली यह पांच
बार टैप एंड होते जा रहा है कि इस सेकंड
टाइम यह थर्ड टाइम यह फोर्थ लाइन यह
सप्ताह तो पांच बार पेंट हो गया है जब मैं
लेफ्ट साइड करवा ठीक है और उसके बाद हम
लोग डिस्कशन करते हैं यह थोड़े
मल्टिप्लिकेशन वाले ऑपरेशन अगर मैं इसमें
भी करूं तब भी नहीं होगा अगर आएगा बिकॉज
इट्स नॉट सपोर्ट ठीक है लिस्ट को वह यह
डिविजन भी ऑपरेशन नहीं आपको ऐसा लगेगा कि
बाइक मैं पूरे के पूरे एलिमेंट डिवाइड हो
गए नहीं ऐसा नहीं है आपको फॉलो लिखना
पड़ेगा हर एक आइटम बनाना पड़ेगा उसके बाद
उसको हर एक आइटम लेना पड़ेगा उसको डिवाइड
कर सकते हैं जैसे मैं एक एग्जांपल दिखाता
हूं आपको
यहां पर मैं लिख दूंगा दौरान एब्सलूट्स और
यहां पर निकायों में
डिवाइड अगर ऐसा कर दोगे तो
सब्सक्राइब बटन पर क्लिक
कर देता है
में का पेस्ट कर देता है ठीक है चलिए और
मेथड देखते हैं पॉप मेथड टॉप मेथड में कुछ
नहीं है बहुत ही सिंपल है अगर समझो यह
मेरा लिस्ट है यह मेरा लिस्ट है अगर मेरे
रिलेटिव व्हाट्सएप लडूंगा तो सबसे लास्ट
एलिमेंट को पॉज कर देगा तो आप ठीक है अब
उसके बाद अगर मैं लेस कि देखूं तो वह
अपडेट भी हो जाता है ठीक है तो यह कैसा
ऑपरेशन है जिस मेथड मामलों कॉल कर रहे हैं
वह लिस्ट को भी अपडेट कर रहा है तो इसलिए
यहां पर लिखा है लेस टिप और यह लिस्ट के
देखिए आप वहां पर पेंट हो रहा है इसके
अंदर बाई डिफ़ॉल्ट अगर आप कुछ वैल्यू ना
दें तो हम लोग यहां पर इंडेक्स सब्सक्राइब
कर सकता है कौन सा स्पेसिफिक इंडेक्स
एलिमेंट आपको उठाना है मैं अगर समझें तो
यह थर्ड लाइन उठाना है यह वाला 2012 तो
मैं यहां से कंटक दे दूंगा और वह वाला
एलिमेंट उठ जाएगा और उसके साथ टेस्टी भी
अपडेट हो जाएगा तो यह
अनधा ऐसे बहुत सारे में
क्या होता है कि आपको करना है ठीक है अगर
मेरे को भी करना पड़े तो मैं उस तरीके से
गैस को स्लो करूंगा और मैं देखूंगा कि भाई
अगर मेरा यह टॉप के में कैसे कर सकता हूं
ठीक है यह सारा चीज है अब यहां पर मैं यह
दो चीज आपके ऊपर छोड़ देता हूं एक है
अकाउंट फ्लू इंडेक्स अनुसार चीज मैंने
डिस्क्रिप्शन कर चुका हूं तो आई हॉप आप
लोगों को यह रिश्ता वीडियो अच्छा लगा
नेक्स्ट वाले ट्युटोरियल में हम लोग सेट
डिक्शनरी से यह सब देखेंगे आर्ट एंड हैव ए
ग्रेट डे है अगर वीडियो अच्छा लगा
डेफिनेटली सब्सक्राइब करें का यह शेयर
करिएगा सबसे क्योंकि मैं हिंदी में पड़ा
रहा हूं और मुझे बहुत ही एक साइड में
दिल्ली में पढ़ाने के लिए पहली बात
यूट्यूब से पढ़ा रहा हूं नाइट में रीयल
लाइफ में भी इंग्लिश में पढ़ाता हूं ठीक
है तो डेफिनेटली सपोर्ट करेगा थैंक्यू
अंडा बाय हैव ए ग्रेट डे
تصفح المزيد من مقاطع الفيديو ذات الصلة
Introduction To Lists In Python (Python Tutorial #4)
Lists Part- 1
DATA TYPES in Python (Numbers, Strings, Lists, Dictionary, Tuples, Sets) - Python for Beginners
Lec-15: Various Data types in Python🐍 | Comparison of all python data types
Python 101: Learn the 5 Must-Know Concepts
ServiceNow Lists and Filters
5.0 / 5 (0 votes)