>>> a = 'hello'
>>> b = [1, 2, 3]
>>> b.append(a)
>>> b
[1, 2, 3, 'hello']
>>> b.extend(a)
>>> b
[1, 2, 3, 'hello', 'h', 'e', 'l', 'l', 'o']
>>> 

 

Fine.

相关文章:

  • 2021-11-29
  • 2021-11-29
  • 2022-01-20
  • 2022-12-23
  • 2021-07-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-11-29
  • 2021-05-31
  • 2022-12-23
相关资源
相似解决方案