We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
On running the following script -
import time print('hey', end='') time.sleep(3)
hey prints after the delay, which is surprising at the first sight.
hey
Because of end='', the output buffer remains unflushed, and Python waits for the program to finish, before printing anything to the console.
end=''
The text was updated successfully, but these errors were encountered:
README: Add new example
c9a1168
Add example - Python breaks order because of unflushed output buffer. Fixes satwikkansal#140
133baac
Add minor snippet related to output buffer flushing
7e96233
Closes satwikkansal/wtfpython#140
satwikkansal
No branches or pull requests
On running the following script -
hey
prints after the delay, which is surprising at the first sight.Because of
end=''
, the output buffer remains unflushed, and Python waits for the program to finish, before printing anything to the console.The text was updated successfully, but these errors were encountered: