In some part of my python program , I need to do this -
(All this is in a loop)
Now the problem is, although command '1.' is executed before '2.' , '3.' and '4.', it actually displays the message of command '1.' on the screen after all 4 commands have been executed, (along with the message of command '4.'). What I want is that it should display the message of command '1.' first, then start with the remaining piece of code... How can I make this happen? (Is there something like flushing for the print command as well?)
This might be what you are looking for How to flush output of Python print?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With