Skip to Content
Learn
Practice Makes Perfect
reverse

Great work so far! Let’s practice writing some functions that work with strings.

Instructions

1.

Define a function called reverse that takes a string textand returns that string in reverse. For example: reverse("abcd") should return "dcba".

You may not use reversed or [::-1] to help you with this.

You may get a string containing special characters (for example, !, @, or #).

Folder Icon

Take this course for free

Already have an account?