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'

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-10-04
  • 2021-10-16
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-24
  • 2021-08-25
  • 2021-06-14
  • 2022-12-23
  • 2021-09-25
  • 2022-02-16
相关资源
相似解决方案