Refactoring the Rock-Paper-Scissors game in Python

Posted on Sat 09 May 2020 in Python • Tagged with refactoring, separation of concerns, function, decomposition

Use function as a tool to refactor a shoddy Rock-Paper-Scissors game


Continue reading

Pyenv - for properly maintaining different versions of Python

Posted on Sun 03 May 2020 in Python • Tagged with python, versions, management

How to install and use Pyenv


Continue reading

A Python decorator which 'saved' logging

Posted on Sat 18 April 2020 in Python • Tagged with decorator, inspect, logging

An usecase where decorators helped me at work related to logging.


Continue reading

Variables In Python - Part 2

Posted on Sat 12 October 2019 in Python • Tagged with variable, value, name

How do variables work with mutable and immutable types?


Continue reading

Variables In Python

Posted on Sun 29 September 2019 in Python • Tagged with variable, value, name

Introducing Python variables through illustrations.


Continue reading

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

Making A Vector behave like builtin

Posted on Sat 24 August 2019 in Python • Tagged with special-methods, python, class, instance, object

Making a Vector behave like builtin using Python special methods.


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