Reverse String functions in Python

def reverseStringManually(st): rev = "" for i in range(0 ,len(st)): rev += st[(len(st) -1) - i] return rev def reverseStringFastly(st): return st[::-1]
These functions reverses any string given.

#python #reverseString

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.