Sign In Required

You need to sign in to access this feature and track your progress.

Easy

Reverse a String

Topic: Strings • Acceptance: 88%
Write a function that reverses a string. The input string is given as an array of characters.

Input Format:

A single line containing the string.

Output Format:

Print the reversed string.

Sample Example:

Sample Input:
hello
Sample Output:
olleh
Sandboxed Engine

Ready to test. Click Test All Cases or Submit Solution to evaluate your code.

Code Playground Cloud Sandbox PYTHON
// Code Playground Cloud Execution Engine v2.4
// Write your code and click 'Run Code' to execute.
$ ready
Standard Input (stdin):
Your code can read standard input via stdin.