Iterators in #Python are usually defined as needing the following two methods:
🐍 __iter__ - provides iteration support
🐍 __next__ - returns the next item in the container
🧵🐍👇
A #Python list isn't considered an iterator. It is an iterable, something that you iterate over. But because lists don't define `__next__`, they aren't technically an iterator.
However, you can turn a list into an iterator using the built-in `iter()` function:
You can create your own iterators in #Python by adding the appropriate magic methods to your class.