Skip to content
Sign upLog in
← Back to Community

Function print output

Profile icon
Woloszin

Hi Guys. I'm with a problem that doesn't happened before.
When a try to print from a def, the console just show after def solve the problem. Before, a def function worked well. does anyone knows what happened?

Ex: https://repl.it/@Woloszin/printOutTest
tf

Answered by OmniShift [earned 5 cycles]
View Answer
Voters
Profile icon
niamhmartyn
Profile icon
Woloszin
Comments
hotnewtop
Profile icon
OmniShift

Change print(i, end="") to print(i, end="", flush=True) to prevent python from buffering each letter.

Profile icon
Woloszin

@OmniShift
u got it! tks so much, OmniShift!