[Python] Compare if datetime.timedelta is between two values

Discussão em 'Python' iniciado por Stack, Dezembro 7, 2024.

  1. Stack

    Stack Membro Participativo

    I have a datetime.timedelta time object in python (e.g. 00:02:00) I want to check if this time is less than 5 minutes and greater then 1 minute.

    I'm not sure how to construct a timedelta object and I'm also not sure if this is the right format to compare times. Would anyone know the most efficient way to do this?

    Continue reading...

Compartilhe esta Página