7.7k views
1 vote
Make a Python function that writes the user input string in vertical order.

User Mdmundo
by
7.2k points

1 Answer

4 votes

Final answer:

To write a Python function that writes a user input string in vertical order, you can iterate through each character of the string and print them individually on separate lines.

Step-by-step explanation:

To write a Python function that writes the user input string in vertical order, you can iterate through each character of the string and print them individually on separate lines. Here's an example:

def vertical_order(string):
for char in string:
print(char)

In this function, the string parameter represents the user input you want to write vertically. Each character of the string is printed on a separate line using the print() function.

User Tiago Duarte
by
7.9k points