print string in reverse order python for loop