Iterating over a Python String

preview_player
Показать описание
Illustrates how to Iterate over a Python String
Рекомендации по теме
Комментарии
Автор

how do you know what to make the character option in the loop? you said it could be anything. Why does it automatically know to go one character at a time? versus say printing 3 characters at a time

BenFreemanDC
Автор

what if I wanted to get a count of the number of letters in each word...how would that be done?

thamastersmooth
Автор

Dear Sir Jonson -- Is the character identifier considered a variable? and
can we look at the character in the foor loop as an object (variable) that creates a new object every time the foor loop goes ?

and what interests me the most is if character is a variable when it is created and from what.

Thanks in advance

mikijasar
Автор

What if I want to repeat a message inputted by a person for an inputted time. For example hello world would be the input and I wanted to repeat the message 4 times, how would I do that?

wamblytk