Added more pythonic solutions