HackerRank Iterables and Iterators in python problem solution - TheCScience