next method example 1

This commit is contained in:
Mert Gör 🇹🇷 2023-09-02 13:12:30 +03:00
parent 3ae332c74b
commit 53d8d941f2
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View File

@ -0,0 +1,5 @@
def __next__(self):
if self.count == self.stop:
raise StopIteration
self.count += 1
return self.count - 1