Turning Learners Into Developers
Codekilla
CODEKILLA
Easy
PY-002python

Reverse a String

Problem

Reverse a given string without using Python's built-in slice `[::-1]` — demonstrate the two-pointer technique.

Input
A single line containing the string.
Output
The reversed string.
Constraints
1 ≤ |s| ≤ 10^5
Sample input
codekilla
Sample output
allikedoc
Explanation
Every character is swapped to its mirror position.
stringstwo-pointersbasics@Amazon@Infosys
Visible test cases
in: codekilla
out: allikedoc
in: a
out: a
Your solution — run it, use AI if stuck
python