Python If Else Hackerrank Solution In Python