# Use: For Loop
# This is slower than slicing because strings in Python are immutable.
# Every time you do char + reversed string,
# Python creates new string in memory.
s = "python java"
reversed_string = ""
for char in s:
reversed_string = char + reversed_string
print(reversed_string)
'''
run:
avaj nohtyp
'''