I'm quite sure, that the internet is full of python while-loops, but one example:

i=0

while i < len(text):
    print text[i]
    i += 1
Answer from Gjordis on Stack Overflow
🌐
Replit
replit.com › home › discover › how to print each character of a string in python
How to print each character of a string in Python | Replit
2 weeks ago - It takes an iterable (like your string) and returns pairs of values for each loop. The first value, index, is the character's position, starting from 0. The second value, char, is the character itself. This method is much cleaner than manually keeping track of a counter, making your code more readable and efficient. Similar principles apply when iterating through a list in Python. text = "Hello" index = 0 while index < len(text): print(text[index]) index += 1--OUTPUT--H e l l o
Discussions

How to print each letter on new line?
You actually just need to delete a line. Calling split on a single word changes your string into a list. w = 'taco' a_list = w.split() >> a_list = ['taco'] Then your loop goes through each item in the list, which is the whole word. However, if you skip the split, you can directly loop over the string, which will go through each character in the string w = 'taco' for letter in w: print(letter) More on reddit.com
🌐 r/learnpython
6
2
June 15, 2016
Iterating each character in a string using Python - Stack Overflow
How can I iterate over a string in Python (get each character from the string, one at a time, each time through a loop)? More on stackoverflow.com
🌐 stackoverflow.com
Python: How can you print strings one character at a time?
Peter Evemy is having issues with: Hey, I've been practising python by writing a little text based adventure game. I'm trying to find a way to print out the dialogue in th... More on teamtreehouse.com
🌐 teamtreehouse.com
2
August 17, 2018
how do i print while loop outputs on the same line?

Alternatively...

Instead of printing in the loop, append what you want to print to a list.

Then AFTER the loop, print out the entire list. Something like join() is great for inserting commas without needing to have a special case for "except after the last one".

result = []
for idx in range(10):
    result.append("n{}".format(idx))
print(",".join(result))
More on reddit.com
🌐 r/learnpython
18
7
February 17, 2022
🌐
Tutorial Gateway
tutorialgateway.org › python-program-to-print-characters-in-a-string
Python Program to Print Characters in a String
December 19, 2024 - # Python program to Print Characters in a String str1 = input("Please Enter your Own String : ") for i in range(len(str1)): print("The Character at %d Index Position = %c" %(i, str1[i])) This python program to display characters in a string ...
🌐
STEMpedia
ai.thestempedia.com › home › examples › print characters in word python using for loop
Print Characters in Word PYTHON using For Loop - Example Project
July 31, 2023 - It is a simple example that demonstrates the process of iterating through a string and accessing each character. #Print the characters in word PYTHON using for loop for letter in 'PYTHON': print(letter)
🌐
PyTutorial
pytutorial.com › for-each-character-in-string-python
PyTutorial | Print each Character of a String in Python
January 6, 2023 - Initialize a while loop that continues until the index string is less than the length. Check the condition: Is index less than the length of the string. Print the character at the current index position in the string using print(string[index]).
🌐
Reddit
reddit.com › r/learnpython › how to print each letter on new line?
r/learnpython on Reddit: How to print each letter on new line?
June 15, 2016 -

Doing some revision, how would I do this:

Using a while loop, write a Python program that displays each of the characters in “Hello” on a new line, with the letter number before each character, starting at 1. e.g.

1: H
2: e
3: l etc.

This is what I have so far:

w = input("Please enter Word: ")
list = w.split()
print(list)

for r in list: print(r, '\t')

I can get it to split sentences but not words.

🌐
Araqev
araqev.com › home › how can you efficiently loop through a string in python?
How Can You Efficiently Loop Through a String in Python?
March 22, 2025 - Yes, you can use a `while` loop to iterate through a string. You would typically use an index to access each character. For example: ```python my_string = "Hello" index = 0 while index < len(my_string): print(my_string[index]) index += 1 ``` What happens if I try to modify a string while looping ...
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python › iterate-over-characters-of-a-string-in-python
Iterate over characters of a string in Python - GeeksforGeeks
July 11, 2025 - Explanation: for char in s: This line loops through the string s, with char representing each character in s one by one. If we need both the character and its index then enumerate() is a great choice. It returns both values in each iteration. ... The print function uses a formatted string, where the f before the string allows us to include variables directly within it using curly braces {}.
🌐
YouTube
youtube.com › shorts › XknOm5OI5Dw
How to print Each Letter of a String in Python #shorts - YouTube
How to print Each Letter of a String in Python#shorts#python
Published   July 13, 2021
🌐
Engineering LibreTexts
eng.libretexts.org › campus bookshelves › arkansas tech university › engineering modeling and analysis with python › 6: strings
6.3: Traversal through a string with a loop - Engineering LibreTexts
September 20, 2025 - This pattern of processing is called a traversal. One way to write a traversal is with a while loop: index = 0 while index < len(fruit): letter = fruit[index] print(letter) index = index + 1
🌐
CodeSpeedy
codespeedy.com › home › print each character of a string one at a time in python
Print Each Character of a String in Python one at a time - CodeSpeedy
April 24, 2019 - We printed each character one by one using the for loop. import time this_string = "Hey I am CodeSpeedy" for character_index in this_string: print(character_index) # print each character at a time from string time.sleep(0.5)
🌐
PyTutorial
pytutorial.com › loop-through-string-characters-in-python-a-guide
PyTutorial | Loop Through String Characters in Python: A Guide
February 21, 2026 - Choose the method based on your need. For just the character, use a for loop. For the index too, use enumerate(). For creating a list, use comprehension. Practice with the examples.
🌐
SwCarpentry
swcarpentry.github.io › swc-releases › 2017.02 › python-novice-inflammation › 02-loop
Programming with Python: Repeating Actions with Loops
February 8, 2017 - It still exists after the loop is over, and we can re-use variables previously defined as loop variables as well: letter = 'z' for letter in 'abc': print(letter) print('after the loop, letter is', letter) ... Note also that finding the length of a string is such a common operation that Python ...
🌐
ds4ad
uwescience.github.io › ds4ad › python_programming › 002-loops.html
Loops in Python | ds4ad
The next time around, vowel is ‘e’ and length is 1, so length is updated to be 2. After three more updates, length is 5; since there is nothing left in aeiou for Python to process, the loop finishes and the print statement on line 4 tells us our final answer. Note that a loop variable is just a variable that’s being used to record progress in a loop. It still exists after the loop is over, and we can re-use variables previously defined as loop variables as well: letter = 'z' for letter in 'abc': print(letter) print('after the loop, letter is', letter) Note also that finding the length of a string is such a common operation that Python actually has a built-in function to do it called len:
🌐
YouTube
youtube.com › watch
Python Program to Print Each Character of a String | For Loop with String | ProgramGuru.org - YouTube
In this video, you’ll learn how to print each character of a string one by one in Python using a simple for loop.🎯 What You’ll Learn in This Video:How to ac...
Published   April 4, 2025
🌐
LaunchCode
education.launchcode.org › lchs › chapters › loops › iterating-over-collections.html
6.5. Loop Through a String — LaunchCode's LCHS documentation
Unlike range(n), which does NOT assign the value of n to the loop variable, the last character in the string IS used. Once Python reaches the end of the string, the loop ends. ... Notice how lines 4 - 6 each print a single character from the string. print(word[0]) displays only the first letter (P).