##Python 3.6, (削除) 110 (削除ここまで)(削除) 114 (削除ここまで) 112 bytes
Python 3.6, (削除) 110 (削除ここまで)(削除) 114 (削除ここまで) 112 bytes
from time import*
while[sleep(9)]:h,m=localtime()[3:5];print('\n'*50+'%2d '%h+'-'*m+f'\n{-~h%24:2} '+'-'*(60-m))
This uses the new f-string formatting to save one byte (f'\n{h+1:2} ' vs '\n%2d '%(h+1).) You can change [sleep(9)] to 1 to save 8 bytes, but then it just spams the screen.
Saved one byte changing while 1:...;sleep 60 to while[sleep(60)]:..., thanks to TuukkaX.
I had to use 5 more bytes to get the next hour displayed after 23 to be 0, instead of 24, as OP just commented. :-(
Recovered one byte by only sleeping 9 seconds instead of 60.
Saved two bytes using a bit-fiddling to shorten (h+1)%24, borrowed from Value Ink's Ruby answer.
##Python 3.6, (削除) 110 (削除ここまで)(削除) 114 (削除ここまで) 112 bytes
from time import*
while[sleep(9)]:h,m=localtime()[3:5];print('\n'*50+'%2d '%h+'-'*m+f'\n{-~h%24:2} '+'-'*(60-m))
This uses the new f-string formatting to save one byte (f'\n{h+1:2} ' vs '\n%2d '%(h+1).) You can change [sleep(9)] to 1 to save 8 bytes, but then it just spams the screen.
Saved one byte changing while 1:...;sleep 60 to while[sleep(60)]:..., thanks to TuukkaX.
I had to use 5 more bytes to get the next hour displayed after 23 to be 0, instead of 24, as OP just commented. :-(
Recovered one byte by only sleeping 9 seconds instead of 60.
Saved two bytes using a bit-fiddling to shorten (h+1)%24, borrowed from Value Ink's Ruby answer.
Python 3.6, (削除) 110 (削除ここまで)(削除) 114 (削除ここまで) 112 bytes
from time import*
while[sleep(9)]:h,m=localtime()[3:5];print('\n'*50+'%2d '%h+'-'*m+f'\n{-~h%24:2} '+'-'*(60-m))
This uses the new f-string formatting to save one byte (f'\n{h+1:2} ' vs '\n%2d '%(h+1).) You can change [sleep(9)] to 1 to save 8 bytes, but then it just spams the screen.
Saved one byte changing while 1:...;sleep 60 to while[sleep(60)]:..., thanks to TuukkaX.
I had to use 5 more bytes to get the next hour displayed after 23 to be 0, instead of 24, as OP just commented. :-(
Recovered one byte by only sleeping 9 seconds instead of 60.
Saved two bytes using a bit-fiddling to shorten (h+1)%24, borrowed from Value Ink's Ruby answer.
##Python 3.6, (削除) 110 (削除ここまで) (削除) 114 (削除ここまで) 112 bytes
from time import*
while[sleep(9)]:h,m=localtime()[3:5];print('\n'*50+'%2d '%h+'-'*m+f'\n{-~h%24:2} '+'-'*(60-m))
This uses the new f-string formatting to save one byte (f'\n{h+1:2} ' vs '\n%2d '%(h+1).) You can change [sleep(9)] to 1 to save 8 bytes, but then it just spams the screen.
Saved one byte changing while 1:...;sleep 60 to while[sleep(60)]:..., thanks to TuukkaX.
I had to use 5 more bytes to get the next hour displayed after 23 to be 0, instead of 24, as OP just commented. :-(
Recovered one byte by only sleeping 9 seconds instead of 60.
Saved two bytes using a bit-fiddling to shorten (h+1)%24, borrowed from Value Ink's Ruby answer Value Ink's Ruby answer.
##Python 3.6, (削除) 110 (削除ここまで) (削除) 114 (削除ここまで) 112 bytes
from time import*
while[sleep(9)]:h,m=localtime()[3:5];print('\n'*50+'%2d '%h+'-'*m+f'\n{-~h%24:2} '+'-'*(60-m))
This uses the new f-string formatting to save one byte (f'\n{h+1:2} ' vs '\n%2d '%(h+1).) You can change [sleep(9)] to 1 to save 8 bytes, but then it just spams the screen.
Saved one byte changing while 1:...;sleep 60 to while[sleep(60)]:..., thanks to TuukkaX.
I had to use 5 more bytes to get the next hour displayed after 23 to be 0, instead of 24, as OP just commented. :-(
Recovered one byte by only sleeping 9 seconds instead of 60.
Saved two bytes using a bit-fiddling to shorten (h+1)%24, borrowed from Value Ink's Ruby answer.
##Python 3.6, (削除) 110 (削除ここまで) (削除) 114 (削除ここまで) 112 bytes
from time import*
while[sleep(9)]:h,m=localtime()[3:5];print('\n'*50+'%2d '%h+'-'*m+f'\n{-~h%24:2} '+'-'*(60-m))
This uses the new f-string formatting to save one byte (f'\n{h+1:2} ' vs '\n%2d '%(h+1).) You can change [sleep(9)] to 1 to save 8 bytes, but then it just spams the screen.
Saved one byte changing while 1:...;sleep 60 to while[sleep(60)]:..., thanks to TuukkaX.
I had to use 5 more bytes to get the next hour displayed after 23 to be 0, instead of 24, as OP just commented. :-(
Recovered one byte by only sleeping 9 seconds instead of 60.
Saved two bytes using a bit-fiddling to shorten (h+1)%24, borrowed from Value Ink's Ruby answer.
##Python 3.6, (削除) 110 (削除ここまで) 114(削除) 114 (削除ここまで) 112 bytes
from time import*
while[sleep(9)]:h,m=localtime()[3:5];print('\n'*50+'%2d '%h+'-'*m+f'\n{(h+1)%24-~h%24:2} '+'-'*(60-m))
This uses the new f-string formatting to save one byte (f'\n{h+1:2} ' vs '\n%2d '%(h+1).) You can change [sleep(9)] to 1 to save 8 bytes, but then it just spams the screen.
Saved one byte changing while 1:...;sleep 60 to while[sleep(60)]:..., thanks to TuukkaX.
I had to use 5 more bytes to get the next hour displayed after 23 to be 0, instead of 24, as OP just commented. :-(
Recovered one byte by only sleeping 9 seconds instead of 60.
Saved two bytes using a bit-fiddling to shorten (h+1)%24, borrowed from Value Ink's Ruby answer.
##Python 3.6, (削除) 110 (削除ここまで) 114 bytes
from time import*
while[sleep(9)]:h,m=localtime()[3:5];print('\n'*50+'%2d '%h+'-'*m+f'\n{(h+1)%24:2} '+'-'*(60-m))
This uses the new f-string formatting to save one byte (f'\n{h+1:2} ' vs '\n%2d '%(h+1).) You can change [sleep(9)] to 1 to save 8 bytes, but then it just spams the screen.
Saved one byte changing while 1:...;sleep 60 to while[sleep(60)]:..., thanks to TuukkaX.
I had to use 5 more bytes to get the next hour displayed after 23 to be 0, instead of 24, as OP just commented. :-(
Recovered one byte by only sleeping 9 seconds instead of 60.
##Python 3.6, (削除) 110 (削除ここまで) (削除) 114 (削除ここまで) 112 bytes
from time import*
while[sleep(9)]:h,m=localtime()[3:5];print('\n'*50+'%2d '%h+'-'*m+f'\n{-~h%24:2} '+'-'*(60-m))
This uses the new f-string formatting to save one byte (f'\n{h+1:2} ' vs '\n%2d '%(h+1).) You can change [sleep(9)] to 1 to save 8 bytes, but then it just spams the screen.
Saved one byte changing while 1:...;sleep 60 to while[sleep(60)]:..., thanks to TuukkaX.
I had to use 5 more bytes to get the next hour displayed after 23 to be 0, instead of 24, as OP just commented. :-(
Recovered one byte by only sleeping 9 seconds instead of 60.
Saved two bytes using a bit-fiddling to shorten (h+1)%24, borrowed from Value Ink's Ruby answer.