Python 常用写法时间list 1.时间import datetimenow=datetime.now()nowStr=now.strftime(now,"%Y%m%d%H%M%S")2.数组,加索引enumerate(arr)3.数组,去除空arr=[x for x in arr if x !=""]arr=filter(None, arr)4.去重复arr=list(set(arr)) python 2023-10-06 153 点赞 2 评论 231 浏览