Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Iterate through string with index in python using while loop and rang

mystring = "Hello Oraask"
   
# Getting length of string 
lengthOfmystring = len(mystring) 
i = 0
   
# Iterating through the string using while loop 
while i < lengthOfmystring: 
    print("Element of string:" , mystring[i])
    i += 1
Source by www.oraask.com #
 
PREVIOUS NEXT
Tagged: #Iterate #string #index #python #loop #rang
ADD COMMENT
Topic
Name
9+1 =