mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 07:12:31 +03:00
[python3/en] fixed "StopIterator", no such Exception (#2591)
* [python3/en] Add empty tuple to "False if evaluated" list * [python3/en] Fixed "StopIterator Exception" - no such exception
This commit is contained in:
parent
7c16ec5ae1
commit
c701931fee
@ -491,7 +491,7 @@ next(our_iterator) # => "one"
|
||||
next(our_iterator) # => "two"
|
||||
next(our_iterator) # => "three"
|
||||
|
||||
# After the iterator has returned all of its data, it gives you a StopIterator Exception
|
||||
# After the iterator has returned all of its data, it gives you a StopIteration Exception
|
||||
next(our_iterator) # Raises StopIteration
|
||||
|
||||
# You can grab all the elements of an iterator by calling list() on it.
|
||||
|
Loading…
Reference in New Issue
Block a user