Question
You have seen messages when coding in Python about iterable and subscriptable. What is the difference between these two?
Answer
A subscriptable does not necessarily use the iter method, but an iterable always does.
A subscriptable object in Python leverages the getitem() method, but it may or may not use the iter method.
…
Continue reading “What Is The Difference between Iterable and Subscriptable in Python?”