比如"what is your name",反转成name your is what
str_new = ""
str = "what is your name"
str_list = str.split(' ')
print(str_list)
strnew_list = list(reversed(str_list))
print (strnew_list)
for i in strnew_list:
    str_new = str_new+i+" "
print (str_new)

 

相关文章:

  • 2021-08-21
  • 2021-07-25
  • 2021-12-05
  • 2021-12-18
  • 2022-12-23
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2021-08-05
  • 2021-06-08
  • 2021-05-15
  • 2022-12-23
  • 2022-02-21
  • 2022-12-23
相关资源
相似解决方案