Ask coding questions

← Back to all posts
How can I make an input in python so stuff is printed after the input
h
okalisl

How can I make an input in python so info will be printed AFTER the input before a value is returned?
I am thinking of something along the lines of this:


Input Here
–––––– Stuff printed after input before value returned

Anyone know?

Answered by Geocube101 [earned 5 cycles]
View Answer
Voters
okalisl
Comments
hotnewtop
Geocube101

You could use the threading module to print to the console while the main thread waits for input()

okalisl

Thanks @Geocube101!

Coder100

You can't.

You could try using curses library:
https://docs.python.org/3/howto/curses.html

MrVoo

Can you be a bit more descriptive? What's stopping you from printing right before you take an input?

okalisl

Sorry about that @MrVoo. I was wondering if you could have an input and before you answer the input there is also stuff printed after the input.(Sorry its confusing)

okalisl

Here is a good example: https://replit.com/@AutisticBoi/hacker-thing?v=1, This has an input and before you answer it there is also text printed after it.