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

mock tests for examination

,

Exam

,

Previous Year Questions with Solutions

,

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

,

video lectures

,

shortcuts and tricks

,

Free

,

Summary

,

Objective type Questions

,

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

,

ppt

,

study material

,

past year papers

,

Extra Questions

,

pdf

,

Semester Notes

,

Viva Questions

,

Sample Paper

,

MCQs

,

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

,

Important questions

,

practice quizzes

;