File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1156,7 +1156,7 @@ class MySortable:
11561156* ** Any object that has methods next() and iter() is an iterator.**
11571157* ** Next() should return next item or raise StopIteration exception.**
11581158* ** Iter() should return an iterator of remaining items, i.e. 'self'.**
1159- * ** Only objects that have iter() method can be used in for loops .**
1159+ * ** Any object that has iter() method can be used in a for loop .**
11601160``` python
11611161class Counter :
11621162 def __init__ (self ):
Original file line number Diff line number Diff line change 989989< li > < strong > Any object that has methods next() and iter() is an iterator.</ strong > </ li >
990990< li > < strong > Next() should return next item or raise StopIteration exception.</ strong > </ li >
991991< li > < strong > Iter() should return an iterator of remaining items, i.e. 'self'.</ strong > </ li >
992- < li > < strong > Only objects that have iter() method can be used in for loops .</ strong > </ li >
992+ < li > < strong > Any object that has iter() method can be used in a for loop .</ strong > </ li >
993993</ ul > < pre > < code class ="python language-python hljs "> < span class ="hljs-class "> < span class ="hljs-keyword "> class</ span > < span class ="hljs-title "> Counter</ span > :</ span >
994994 < span class ="hljs-function "> < span class ="hljs-keyword "> def</ span > < span class ="hljs-title "> __init__</ span > < span class ="hljs-params "> (self)</ span > :</ span >
995995 self.i = < span class ="hljs-number "> 0</ span >
You can’t perform that action at this time.
0 commit comments