【发布时间】:2019-05-08 20:36:01
【问题描述】:
#i'm just testing it
lst=[3, 2, 4, 5,1]
print([i for i in lst if i % 2 != 0].sort()[0])
#i haven't tried any thing
#I expect the output 1
【问题讨论】:
-
#i haven't tried any thing-- 我建议您这样做:删除[0]并查看表达式的类型(您可以使用type或仅使用print)。
标签: sorting python-3.7 nonetype