“python iterate sobre corda” Respostas de código

Python iterando através de uma corda

# Iterating through a string
count = 0
for letter in 'Hello World':
    if(letter == 'l'):
        count += 1
print(count,'letters found')
SAMER SAEID

python iterate sobre corda

word = "test"
for letter in word:
	print(letter)
Attractive Ape

Itera através da corda em python usando o loop e tocou

mystring = "Hello Python"
# getting length of string 
lengthOfmystring = len(mystring) 
# Iterating the index 
for var in range(lengthOfmystring): 
	print("Element of string:" , mystring[var])
Cautious Cow

Respostas semelhantes a “python iterate sobre corda”

Perguntas semelhantes a “python iterate sobre corda”

Mais respostas relacionadas para “python iterate sobre corda” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código