Back-End Programming Exam  >  Back-End Programming Videos  >  Python Tutorial in Hindi  >  Python tutorial in Hindi 28 : List part 4 ( index ; reverse ; sort method ; sorted function)

Python tutorial in Hindi 28 : List part 4 ( index ; reverse ; sort method ; sorted function) Video Lecture | Python Tutorial in Hindi - Back-End Programming

FAQs on Python tutorial in Hindi 28 : List part 4 ( index ; reverse ; sort method ; sorted function) Video Lecture - Python Tutorial in Hindi - Back-End Programming

1. Python में index() और reverse() फ़ंक्शन क्या हैं?
उत्तर 1. index() फ़ंक्शन Python में एक लिस्ट के भीतर एक विशिष्ट मान के इंडेक्स को खोजने के लिए उपयोग होता है। यदि मान मौजूद नहीं है, तो यह ValueError उठाएगा। वहीं, reverse() फ़ंक्शन एक लिस्ट को उल्टा करने के लिए उपयोग होता है, जिससे उसके आदेश को बदल दिया जाता है।
2. sort() और sorted() फ़ंक्शन में क्या अंतर है?
उत्तर 2. sort() और sorted() दोनों फ़ंक्शन लिस्ट को क्रमबद्ध करने के लिए उपयोग होते हैं, लेकिन उनमें कुछ अंतर है। sort() फ़ंक्शन लिस्ट को सीधे रूप में क्रमबद्ध कर देता है, जबकि sorted() फ़ंक्शन नया क्रमबद्ध लिस्ट बनाता है और उसे वापस देता है। इसलिए, sort() फ़ंक्शन लिस्ट को सीधे रूप में बदलता है जबकि sorted() फ़ंक्शन एक नया क्रमबद्ध लिस्ट बनाता है।
3. sort() और sorted() फ़ंक्शन किस प्रकार का क्रमबद्ध करते हैं?
उत्तर 3. sort() और sorted() फ़ंक्शन दोनों फ़ंक्शन आर्ग्यूमेंट के आधार पर लिस्ट को क्रमबद्ध करते हैं। यदि आर्ग्यूमेंट नहीं दिया गया है, तो वे लिस्ट को डिफ़ॉल्ट तरीके से क्रमबद्ध करते हैं, जिसमें अक्षरों की आराम से बढ़ती क्रम में क्रमबद्धि उपयोग होती है।
4. एक लिस्ट के विभिन्न मानों को कैसे क्रमबद्ध कर सकते हैं?
उत्तर 4. एक लिस्ट के मानों को sort() फ़ंक्शन का उपयोग करके क्रमबद्ध किया जा सकता है। इसके लिए, आपको लिस्ट के नाम के बाद डॉट नोटेशन का उपयोग करना होगा, फिर उसके बाद sort() फ़ंक्शन को लिखें।
5. क्या हम एक लिस्ट के इंडेक्स और उसके मान को एक ही फ़ंक्शन के भीतर खोज सकते हैं?
उत्तर 5. हाँ, हम एक लिस्ट के इंडेक्स और उसके मान को index() फ़ंक्शन के भीतर खोज सकते हैं। इसके लिए, आपको लिस्ट के नाम के बाद डॉट नोटेशन का उपयोग करना होगा, फिर उसके बाद index() फ़ंक्शन को लिखें।
Related Searches

past year papers

,

Sample Paper

,

shortcuts and tricks

,

MCQs

,

video lectures

,

Objective type Questions

,

Previous Year Questions with Solutions

,

Viva Questions

,

Important questions

,

Exam

,

Summary

,

ppt

,

mock tests for examination

,

Python tutorial in Hindi 28 : List part 4 ( index ; reverse ; sort method ; sorted function) Video Lecture | Python Tutorial in Hindi - Back-End Programming

,

practice quizzes

,

Python tutorial in Hindi 28 : List part 4 ( index ; reverse ; sort method ; sorted function) Video Lecture | Python Tutorial in Hindi - Back-End Programming

,

Python tutorial in Hindi 28 : List part 4 ( index ; reverse ; sort method ; sorted function) Video Lecture | Python Tutorial in Hindi - Back-End Programming

,

pdf

,

Semester Notes

,

Free

,

study material

,

Extra Questions

;