I have a function that returns seconds into days, hours, mins and sec. But I need to However, not print if outputs are 0. For example, if I enter 176400 seconds I want output would be "2 day 1 hours" not "2 day, 2 hours, 0 minutes, 0 seconds".

I did so far:

```
sec = int(input("Enter time in Seconds: "))
temp = sec
day = sec // 86400
sec %= 86400
hour = sec // 3600
sec %= 3600
mins = sec // 60
sec %= 60

if day >= 1:
    print(f'time in minutes is {day}days {hour}hour {mins}min {sec}sec')

elif hour >= 1:
    if mins == 0 and sec == 0:
        print(f'time in minutes is {hour}hour')
    elif mins == 0:
        print(f'time in minutes is {hour}hour {sec}sec')
    elif sec == 0:
        print(f'time in minutes is {hour}hour {mins}min')
    else:
        print(f'time in minutes is {hour}hour {mins}min {sec}sec')

elif mins >= 1:
    if sec == 0:
        print(f'time in minutes is {mins}min')
    else:
        print(f'time in minutes is {mins}min {sec}sec')

elif sec >= 1:
    print(f'time sec == {sec} sec')

```

I could be continue This code using bunch of "if" statement, but is there shorter way to do this?