python 找到列表中满足条件的元素

a = [1,2,3,4,5,6,7,8,9]
b = [str(x) for x in a if x%2==1]
s = ''.join(b)

=>'13579'
原文地址:https://www.cnblogs.com/ice5/p/14116188.html