我是 python 新手,遇到了一个问题:我的任务是 "Given a sentence, return a sentence with the words reversed"
例如 Tea is hot --------> hot is Tea
我的代码是:
def funct1 (x):
a,b,c = x.split()
return c + " "+ b + " "+ a
funct1 ("I am home")
Run Code Online (Sandbox Code Playgroud)
它确实解决了答案,但我有两个问题:
谢谢你。