题解 | #数字颠倒#
数字颠倒
https://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
s=input()
#倒序遍历
# mylen=len(s)
# res=[]
# for i in range(mylen):
# res.append(s[mylen-i-1])
# print(''.join( res) )
#字符串切片特性s[首:尾:步长]
res=s[::-1]
print(res)
数字颠倒
https://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
s=input()
#倒序遍历
# mylen=len(s)
# res=[]
# for i in range(mylen):
# res.append(s[mylen-i-1])
# print(''.join( res) )
#字符串切片特性s[首:尾:步长]
res=s[::-1]
print(res)
相关推荐
SHC2:春招先狠狠投递,然后你看看能不能申请香港新加坡的一年制master,花不了多少钱,或者现在赶紧去刷一段实习。HR专业考研没必要
查看5道真题和解析