This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
Thursday, 23 September 2021
Python: Print character one at a time in string
Using
‘for’ loop, you can print the characters one at a time.
print_char_by_char.py
defprint_chars(str):for ch in str:
print(ch)
print_chars('Hello World')
No comments:
Post a Comment