I'm a beginner and, when I try to transform date time to mins, I get the error:
ValueError: too many values to unpack
Here's my code:
def t2m(t):
m,s,l = t.strip().split(":")
return int(m)+int(s)/60+int(l)/6000
a= "0000-00-00 00:12:46:13"
d=a.strip('0000-00-00 00')
print(round(t2m(d)),1)