हिंदी
तमिलनाडु बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान कक्षा १२

What is the use of the next() function? - Computer Science

Advertisements
Advertisements

प्रश्न

What is the use of the next() function?

लघु उत्तरीय

उत्तर

The next() function in Python is used to retrieve the next item from an iterator. If the iterator is exhausted, it raises a StopIteration exception. You can also provide a default value to be returned if the iterator is exhausted, preventing the exception. 

Syntax: 

next(iterator, default_value)
shaalaa.com
Creating a CSV File Using Notepad (or Any Text Editor)
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 13: Python and CSV files - Evaluation [पृष्ठ २६६]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 12 TN Board
अध्याय 13 Python and CSV files
Evaluation | Q 4. | पृष्ठ २६६
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×