Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = int( input("Másodperc: ") )
- years, s = divmod(s, 60*60*24*30*12)
- months, s = divmod(s, 60*60*24*30)
- days, s = divmod(s, 60*60*24)
- hours, s = divmod(s, 60*60)
- minutes, seconds = divmod(s, 60)
- print(f"{years} év {months} hó {days} nap {hours} óra {minutes} perc {seconds} mp")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement