Hackerrank Solutions Python 3