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

字符串操作

时间:2018-05-23 22:12:45      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:bubuko   end   .com   div   image   序号   put   生日   col   

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

技术分享图片

stuNum=‘201709080003‘
print(‘年级是:‘+stuNum[0:4])
print(‘专业编号是;+stuNum[4:9]‘)
print(‘序号是;‘+stuNum[-3:])
IDNo= ‘440105199909211926‘
print(‘省市是:‘+IDNo[0:2])
print(‘生日是:‘+IDNo[-8:-4])
print(‘性别是:‘+IDNo[-2])

技术分享图片

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

技术分享图片

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

技术分享图片

字符串操作

标签:bubuko   end   .com   div   image   序号   put   生日   col   

原文地址:https://www.cnblogs.com/bjzy/p/9079354.html

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