Just a small thing: I suspect your print statement should be indented one to the left. Otherwise you're printing out for every i in range(len(test_str)).