codegamy_logo

CODELAB

2. Reverse the String

Given a string s, print the reversed version of the string.

For example, if the input is hello, the output should be olleh.

Input Format

A single line containing the string s.

Output Format

A single line containing the reversed string.

Sample Input

world

Sample Output

dlrow

Constraints:

  • 1 ≤ length of s ≤ 105
  • s contains only lowercase English letters.
Python
Dark
14

Custom Input

Output

Custom Input

Output

2. Reverse the String

Given a string s, print the reversed version of the string.

For example, if the input is hello, the output should be olleh.

Input Format

A single line containing the string s.

Output Format

A single line containing the reversed string.

Sample Input

world

Sample Output

dlrow

Constraints:

  • 1 ≤ length of s ≤ 105
  • s contains only lowercase English letters.
Python
Dark
14

Custom Input

Output

Custom Input

Output

2025 © CodeLab(PSTU) | All Rights Reserved.

Developed by Hasib-17❤️