Reverse

def reverse(s)

Algorithm

A function to reverse a string as argument.

Parameter

Type

Description

s

String

The string to reverse

Returns

str : The reversed string


Source Code

str= ""
for i in s:
        str=i+str
return str