[Python] python字符串按单词反转输出 →→→→→进入此内容的聊天室

来自 , 2020-11-27, 写在 Python, 查看 107 次.
URL http://www.code666.cn/view/0e230b1a
  1. import re
  2. astring = 'hello world'
  3. revwords = ' '.join(reversed(astring.split()))
  4. print(revwords)
  5.  
  6.  

回复 "python字符串按单词反转输出"

这儿你可以回复上面这条便签

captcha