Solved

When a Programmer Calls the Next Function on an Iterator

Question 45

Multiple Choice

When a programmer calls the next function on an iterator object, what happens if there is no current item in the sequence?


A) the previous item is returned
B) the compiler generates an error
C) a StopIteration exception is raised
D) the None item is returned

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents