Nylithius Nylithius - 2 months ago 4x
Python Question

set time limitations for timer

Is there are nicer way to write the code like this?

# ugly piece of code
seconds = 0 if seconds < 0 else seconds
seconds = 86399 if seconds >= 86400 else seconds

I mean - I need to setup the strict possible range of seconds

seconds = max(0, min(86399, seconds))