0
Display Each Character of String Vertically
String = "Your Name" How do you do this? Output: Y o u r N a m e
4 Answers
+ 7
for i in string:
print(i)
+ 4
Replace "." in either line with "\n":
https://code.sololearn.com/c876jbnGfG61/?ref=app
+ 3
String = "Your Name"
for s in String:
print(s)
+ 1
Here's another way:
string = 'Your Name'
print('\n'.join(string))