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:
1156
1156
* ** Any object that has methods next() and iter() is an iterator.**
1157
1157
* ** Next() should return next item or raise StopIteration exception.**
1158
1158
* ** 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 .**
1160
1160
``` python
1161
1161
class Counter :
1162
1162
def __init__ (self ):
Original file line number Diff line number Diff line change 989
989
< li > < strong > Any object that has methods next() and iter() is an iterator.</ strong > </ li >
990
990
< li > < strong > Next() should return next item or raise StopIteration exception.</ strong > </ li >
991
991
< 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 >
993
993
</ 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 >
994
994
< span class ="hljs-function "> < span class ="hljs-keyword "> def</ span > < span class ="hljs-title "> __init__</ span > < span class ="hljs-params "> (self)</ span > :</ span >
995
995
self.i = < span class ="hljs-number "> 0</ span >
You can’t perform that action at this time.
0 commit comments