代码:
1 a = [datetime.date(2010, 10, 20), 1, 4, datetime.date(2013, 10, 20)] 2 maz_=max(d for d in a if isinstance(d, datetime.date)) 3 print(maz_)
python 获得日期列表中最大日期(能够剔出不是日期类型)
原文:https://www.cnblogs.com/smartisn/p/14426022.html