【发布时间】:2016-02-01 21:36:06
【问题描述】:
我想反转字符串中字符的顺序 所以将字符串作为参数 并返回带有原始字符串字母的新字符串 示例 - “hello”将返回“olleh”
我得到的只是:
def reverse(" "):
string = input("Give me a word")
x = ord(string)
print(x)
【问题讨论】:
-
有个函数叫
reversed。
标签: python string function return reverse