diff --git a/python-temel/next.method.py b/python-temel/next.method.py new file mode 100644 index 0000000..e418001 --- /dev/null +++ b/python-temel/next.method.py @@ -0,0 +1,5 @@ +def __next__(self): + if self.count == self.stop: + raise StopIteration + self.count += 1 + return self.count - 1