next() raises a StopIteration exception tellint the for loop to terminate : Next : Buildin Function PYTHON examples


PYTHON examples » Buildin Function » Next »

 

next() raises a StopIteration exception tellint the for loop to terminate


next() raises a StopIteration exception tellint the for loop to terminate



s = 'abcdef'
it = iter(s)
it

print it.next()

print it.next()

print it.next()

print it.next()


           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Buildin Function
» Next