Reverse a string #
Write a Python function that takes a string as input and returns the reverse of that string.
Tests #
reverse_a_string("Hello")should return"olleH"reverse_a_string("Python is so easy!")should return"!ysae os si nohtyP"reverse_a_string("12345")should return"54321"reverse_a_string("123!@#")should return"#@!321"reverse_a_string("Hello World!")should return"!dlroW olleH"
Hints #
- Try looping each character in the given string and then build the result from each character.
Getting Started with Python
Data Types
Python Functions
Statements in Python
Basic Debugging in Python
Basic Algorithm
Object-Oriented Programming
Error Handling
Intermediate Algorithm
Python Modules