Reverse String in Python

  • Post category:String

In this article, you will see how to reverse string in Python. The string reverse means reversing the order of the characters in a string. The str[::-1] is a Python slice that reverses a string.

Step 1: Create a string

Python

Step 2: Reverse string

Python

Output:

str =  CodeAllow
str type =  <class 'str'>
Reversed =  wollAedoC

Free resources to learn advanced skills: AiHints and CodeAllow