Answers for "looping in string python"

3

python iterate over string

word = "test"
for letter in word:
	print(letter)
Posted by: Guest on January-19-2021
0

Iterate through string in python using for loop

mystring = "Hello python";
for ch in mystring:
	print("Index of Element :", mystring.index(ch) , " - Element of string:",ch)
Posted by: Guest on March-05-2022

Python Answers by Framework

Browse Popular Code Answers by Language