码迷,mamicode.com
首页 > 其他好文 > 详细

字符串操作

时间:2018-05-23 22:06:28      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:bubuko   字符   code   ima   put   pre   int   else   http   

idno =440000199804024147
地区=idno[0:6]
生日=idno[6:14]
性别=idno[-2]
print(地区,生日,性别)
if(int(性别) % 2 == 0):
    print(girl)
else:
    print(boy)

for i in range(12):
    print(9800+i,chr(9800+i))


s=input(明文:)
for c in s:
    print(chr(ord(c)+3),end=‘‘)

s=input(\n密文:)
for c in s:
    print(chr(ord(c)-3),end=‘‘)

技术分享图片

 

字符串操作

标签:bubuko   字符   code   ima   put   pre   int   else   http   

原文地址:https://www.cnblogs.com/mintine/p/9079456.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!