+ 1
How do I format this?
How do I format my output using f string if I want to display hh:mm:ss with two digits regardless whether the value is a one digit number, likesay 8:8:8 should be 08:08:08?
2 Respostas
+ 4
hour = 8
min = 8
sec = 8
print(f"{hour:02}:{min:02}:{sec:02}")
0
I cant understand your question