Hacker Rank Python If Else Solution