Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

iterate a string array using for loop in Python

str_list = ["New York","Los Angeles","Chicago","Houston","Phoenix",
            "Philadelphia"]

for x in range(len(str_list)):
    print(str_list[x])
Source by linuxhint.com #
 
PREVIOUS NEXT
Tagged: #iterate #string #array #loop #Python
ADD COMMENT
Topic
Name
4+7 =