Some Python Exercises Hackerrank Problem