- Introduction to continue statement in python in Hindi
- Pass statement in python in Hindi

Introduction to continue statement in Python
python में continue statement का उपयोग प्रोग्राम नियंत्रण को लूप की शुरुआत में लाने के लिए किया जाता है। continue statement लूप के अंदर कोड की शेष लाइनों को छोड़ देता है और अगले पुनरावृत्ति के साथ शुरू होता है। यह मुख्य रूप से लूप के अंदर एक विशेष स्थिति के लिए उपयोग किया जाता है ताकि हम किसी विशेष स्थिति के लिए कुछ विशिष्ट कोड को छोड़ सकें।
पायथन जारी बयान का सिंटैक्स नीचे दिया गया है।
#loop statements
continue
#the code to be skipped
उदाहरण 1
i = 0
while(i < 10):
i = i+1
if(i == 5):
continue
print(i)
आउटपुट:
1 2 3 4 6 7 8 9 10
उदाहरण 2
str = "Hinditutorialspoint"
for i in str:
if(i == 'T'):
continue
print(i)
आउटपुट:
H i n d i t u t o r i a l s p o i n t
Pass statement
पास स्टेटमेंट एक null ऑपरेशन है क्योंकि इसे निष्पादित किए जाने पर कुछ भी नहीं होता है। यह उन मामलों में उपयोग किया जाता है जहां एक statement की syntactically आवश्यकता होती है लेकिन हम इसके स्थान पर किसी भी निष्पादन योग्य statement का उपयोग नहीं करना चाहते हैं।
उदाहरण के लिए, subclass में एक parent class method को ओवरराइड करते समय इसका उपयोग किया जा सकता है, लेकिन subclass में इसके specific implementation को नहीं देना चाहता।
पास का उपयोग वहां भी किया जाता है जहां कोड कहीं लिखा जाएगा लेकिन अभी तक प्रोग्राम फ़ाइल में नहीं लिखा गया है।
पास स्टेटमेंट का सिंटैक्स नीचे दिया गया है।
उदाहरण
list = [1,2,3,4,5]
flag = 0
for i in list:
print("Current element:",i,end=" ");
if i==3:
pass
print("\nWe are inside pass block\n");
flag = 1
if flag==1:
print("\nCame out of pass\n");
flag=0
आउटपुट:
Current element: 1 Current element: 2 Current element: 3 We are inside pass block Came out of pass Current element: 4 Current element: 5
Sir, call me +91 8534867764