Reddit #166b easy challenge in python