4 ms·
The "\r" in the format string for the number is carriage return. It ensures that as long as you print to terminal rather than redirect to file etc., the number
by vidarh 9y ago
The "\r" in the format string for the number is carriage return. It ensures that as long as you print to terminal rather than redirect to file etc., the number gets overwritten if anything else gets printed on the same line.
- AlexCoventry 9y agoAh, thank you.