Run
# Given string x = "Hello World" # Convert string into list of chars x_chars = list(x) # Reverse the list x_chars.reverse() # Join the characters in the list x_reversed = ''.join(x_chars) # Print reversed string print(x_reversed)
Output