List Comprehension Python Hackerrank Solution