>>> s="I am fine"
>>> s
'I am fine'
>>> s.split(" ")
[
'I', 'am', 'fine']
>>> sList=s.split(" ")
>>> sList
[
'I', 'am', 'fine']
>>> "%".join(sList)
'I%am%fine'

Notes:

1)String is transfered to a List by split method

2)List can be joined a string by join method

相关文章:

  • 2022-02-16
  • 2022-03-02
  • 2021-06-17
  • 2022-12-23
  • 2022-01-07
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-03
  • 2022-12-23
  • 2021-09-07
  • 2021-12-29
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案