+ 1
\t is a tab. Hit the tab key to find out more. \r is carriage return. it moves the terminal cursor back to the start of the active line. It's used mostly to make it appear as if the terminal is updating. To learn more, run this code in an external IDE: from time import sleep import sys i=1 print(i, end=' ') for x in range(99): i+=1 # using \r "carraige return" (think of typewriters...PING!) print(f'\rTotal {i} Half {i/2} Double {i*2}', end=' ') sleep(2)
30th Jul 2022, 3:25 PM
Slick
Slick - avatar