next method example 1
This commit is contained in:
parent
3ae332c74b
commit
53d8d941f2
5
python-temel/next.method.py
Normal file
5
python-temel/next.method.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
def __next__(self):
|
||||
if self.count == self.stop:
|
||||
raise StopIteration
|
||||
self.count += 1
|
||||
return self.count - 1
|
Loading…
Reference in New Issue
Block a user