How to reverse a string in python?

前端 未结 0 1940
星月不相逢
星月不相逢 2020-12-24 01:47
p_phrase = "was it a car or a cat I saw"

p = p_phrase.split()

p.reverse()

print(p_phrase)

r_phrase = ""

for words in p:

    if p_phrase !=          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题