Revised and shortened Python solution to Challenge 135 [Easy]