print flush python documen code example
Example 1: print flush python
import sys
sys.stdout.flush()
Example 2: print flush python
print("Hello world!", flush=True)
import sys
sys.stdout.flush()
print("Hello world!", flush=True)