A more pythonic way of code writing.