Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ntimedelta オブジェクトのリストが与えられた場合、最も低い時間単位は分です。
n
from datetime import timedelta as td [td(days=1, hours=4, minutes=0), td(days=0, hours=2 minutes=30), td(days=3, hours=0 minutes=30), ...]
最小公倍数を見つけるにはどうすればよいですか.
すべてを秒に変換して、LCM を取得できます。使用するtimedelta.total_seconds()
timedelta.total_seconds()
https://docs.python.org/2/library/datetime.html