completed reverse-string.py