How to print every character of a string
• 1 minAs you might not know, strings are considered as lists of characters in Python.
So to say you can go through it with a simple loop.
# We define our string
my_string = "Wassup guys ?"
# We go through every character in our string
for char in my_string:
# We print it
print(carac)
Here you are! You now know how to print every character in a string.
More on fundamentals
If you want to know more about Python fundamentals without headaches... check out the other articles I wrote by clicking just here:
Fundamentals - The Python You Need
We gathered the only Python essentials that you will probably ever need.