HackerRank Inner and Outer in python problem solution - TheCScience