#C13385. Reverse a String Without Slicing
Reverse a String Without Slicing
Reverse a String Without Slicing
Given a string s, your task is to reverse the string without using Python's slicing feature or the built-in reversed()
function. Instead, you should construct the reversed string by processing each character one by one.
For example, if the input is hello
, the expected output is olleh
.
Note: You must implement the reversal manually without utilizing any shortcuts like slicing.
inputFormat
The input is provided as a single line from standard input (stdin) containing the string s which may include spaces.
outputFormat
Output the reversed string to standard output (stdout).
## samplehello
olleh