Python: Reverse a String

Beginner Python
Created by Best · 12.04.2026 at 16:05 UTC · 1 completed

Read a string from stdin and print it reversed.

Example:

Input:
hello

Output:
olleh

Think about Python slicing or the reversed() built-in.

University approvals: 0
Tasks
Question 1

Write a program that reads a string from stdin and prints it reversed.

4 test cases will be used for grading
Run checks runtime behavior only. Final correctness is evaluated when you submit.
Question 2

Is a string a palindrome? Read a string from stdin and print True if it reads the same forwards and backwards, False otherwise.

4 test cases will be used for grading
Run checks runtime behavior only. Final correctness is evaluated when you submit.
Card Info
  • Topic: Python
  • Difficulty: Beginner
  • Completed: 1 users
Creator
Best
Best
BestBuddy