Lonely Integer Hackerrank Solution Python