题解 | #字符串反转#
字符串反转
http://www.nowcoder.com/practice/e45e078701ab4e4cb49393ae30f1bb04
str1 = input() list1 = [] for i in str1: if ord(i) >= 97 and ord(i) <= 122: list1.append(i) if len(str1) == len(list1): list1.reverse() str2 = ''.join(list1) print(str2)