Python If Else Hackerrank Solution Cpp