runxinzhi.com
首页
百度搜索
Python天天美味(8) 字符串中的字符倒转(转)
方法一,使用[::-1]:
s
=
'
python
'
print
s[::
-
1
]
方法二,使用reverse()方法:
l
=
list(s)
l.reverse()
print
''
.join(l)
输出结果:
nohtyp
nohtyp
相关阅读:
Admin添加字段
django admin基础
user_admin
admin 模块功能
todolist项目
Django进阶项目
Django进阶
bolg项目
EL&jstl
模拟用户登录,内含验证码验证和request等操作
原文地址:https://www.cnblogs.com/qq78292959/p/3066639.html
最新文章
poj 1328 Radar Installation
poj 2965 The Pilots Brothers' refrigerator
poj 1753 Flip Game
银行家算法
HDU-4004 The Frog's Games
HDU-1285 确定比赛名次
HDU-2527 Safe Or Unsafe
HDU-1701 Binary Tree Traversals
UVA624(01背包记录路径)
POJ2488:A Knight's Journey
热门文章
POJ3256:Cow Picnic
POJ2531:Network Saboteur
HUD1455:Sticks
HDU1518:Square
2006浙大:简单计算器
2006浙大火星A+B
nefu阶乘定理
POJ2689:素数区间筛选
零散
创建步骤
Copyright © 2020-2023
润新知