What do I write in print to make this thing display seconds in hh:mm:ss format? Sorry if Im saying some BS since I'm really new to coding
x = int(input())
s = x
m = x//60
h = x//3600
print(
What do I write in print to make this thing display seconds in hh:mm:ss format? Sorry if Im saying some BS since I'm really new to coding
x = int(input())
s = x
m = x//60
h = x//3600
print(
x = int(input())
s = x % 60
m = (x//60) % 60
h = x//3600
print( "%02d:%02d:%02d" % (h,m,s) )
Depending on what you're doing, it might be better to use the datetime
module for this.