Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Iterate through string backwards in python

mystring = "Hi Python"
    
# Iterating through the string using while loop 
for i in mystring[-1: -7 : -1] : 
# Print all characters iterated
    print("Element of string:" , i)
Source by www.oraask.com #
 
PREVIOUS NEXT
Tagged: #Iterate #string #python
ADD COMMENT
Topic
Name
3+8 =