Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to Reverse a string in python

s = 'KDnuggets'

print('The reverse of KDnuggets is {}'.format(s[::-1]))

# Output

# The reverse of KDnuggets is: steggunDK
Source by www.kdnuggets.com #
 
PREVIOUS NEXT
Tagged: #How #Reverse #string #python
ADD COMMENT
Topic
Name
1+5 =