Slicing an iterator

Posted on Sun 22 September 2019 in Python • Tagged with iterable, iterator, islice, itertools

Explains the method used to slice any iterable not just sequences.


Continue reading

How does for loop work in Python ?

Posted on Sun 15 September 2019 in Python • Tagged with for-loop, iterable, iterator, iterator-protocol

The behind the scenes of Python for loop.


Continue reading

How to check whether an object is iterable in Python ?

Posted on Sat 07 September 2019 in Python • Tagged with iterable, iterator, iter(), getitem, Iterable

Different methods to check the iterability of an object in Python.


Continue reading

How to check whether an object is iterable in Python ?

Posted on Sat 07 September 2019 in Python • Tagged with iterable, iterator, iter(), getitem, Iterable

Different methods to check the iterability of an object in Python.


Continue reading

How to perform lstrip of an iterable?

Posted on Sun 18 August 2019 in Python • Tagged with itertools, dropwhile, lstrip, iterable, iterator

Using the dropwhile functions in the itertools module


Continue reading