Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

iterating string in python

"""
Python Program:
 Using range() to iterate over a string in Python
"""
string_to_iterate = "Data Science"
for char_index in range(len(string_to_iterate)):
   print(string_to_iterate[char_index])
Source by www.techbeamers.com #
 
PREVIOUS NEXT
Tagged: #iterating #string #python
ADD COMMENT
Topic
Name
1+3 =