Reputation: 423
I am taking user input and my message is a multi line string,so whenever i execute my script, a newline is printed.
code:
name = "name"
message_count = "count"
curr_time = "curr_time"
input_message = f"""
╔=======-{name}|{message_count}|{curr_time}
|_____
"""
var = input(input_message)
Output:
i want the cursor to be on same line as the input message,is it possible in python.
Upvotes: 1
Views: 41
Reputation: 89214
Just remove the newline at the end of the string.
input_message = f"""
╔=======-{name}|{message_count}|{curr_time}
|_____"""
Upvotes: 1