#句子逆序#
def func():
string = input()
assert(len(string) >= 1 and len(string) <= 1000)
flag = 0
for s in string:
if s.isalpha() == False and s != :
flag = 1
break
if flag == 0:
string = reversed(string.split( ))
print( .join(string))
if __name__ == __main__:
func()
def func():
string = input()
assert(len(string) >= 1 and len(string) <= 1000)
flag = 0
for s in string:
if s.isalpha() == False and s != :
flag = 1
break
if flag == 0:
string = reversed(string.split( ))
print( .join(string))
if __name__ == __main__:
func()
2021-11-06
在牛客打卡3天,今天学习:刷题 41 道/代码提交 10 次
全部评论
相关推荐