Is this code good ? what are you best suggestions ?
I wanted to practice python from a book called Think Python, and there was an exercise asking to write a script that reads the current time and converts it to a time of day in hours, minutes, and seconds, plus the number of days since the epoch. I did my own code down below, I just wanted to have confirmation if it's working correctly and if you guys have an advice for a better code because I'm a beginner and I'm trying to practice. def to_day_in_hours(): import time t = time.time() print("The current time is : \n",t) days = t // ( 3600 * 24 ) print("Days since epoch are : \n",days) minutes = t // 60 print("The minutes are : \n",minutes) hours = minutes // 60 print("The hours are : \n",hours) print( int(hours % 60), ":", int(minutes % 60),":", int(t % 60),"on",int(days),"Days since epoch") to_day_in_hours()