Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

looping through strings

string_name = "geeksforgeeks"

#iterate over the string 
for element in string_name:
	print(element, end= ' ')
print("
")

string_name = "GEEKS"

for element in range(0, len(string_name)):
	print(string_name[element])
Comment

PREVIOUS NEXT
Code Example
Python :: import folder from another folder python 
Python :: how to pass csrf token in post request django 
Python :: python popen 
Python :: How split() works in Python? 
Python :: pure imagination 
Python :: all python statements 
Python :: Python - Comment lire une ligne de fichier par ligne 
Python :: how to pass primary key to url django 
Python :: hello world in python 3 
Python :: python one line key increment or add 
Python :: join two strings python 
Python :: custom dataset pytorch 
Python :: pathlib check is file 
Python :: pandas print column by index 
Python :: how to calculate the google map distance in python 
Python :: defaultdict in python 
Python :: np evenly spaced array 
Python :: python is ascii 
Python :: hh:mm to mins in python 
Python :: sleep your computer python 
Python :: python get dpi of image 
Python :: puthon for loop 
Python :: element tree directory python 
Python :: Amazon price tracker in Python 
Python :: python code style 
Python :: how to repeat a row in pandas 
Python :: pandas transform count where condition 
Python :: python vim auto indent on paste 
Python :: python if string has spaces 
Python :: winsound python 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =