题解 | #数字颠倒#
数字颠倒
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)
相关推荐
冰炸橙汁_不做oj版:虽然石凯说这大作业能用但是我感觉走java后端还是算了吧,项目一般放两个就行,建议到知识星球上找个项目把前两个换掉