字符串及其操作
stuNum = '201709090070' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:8]) print('序号是:'+stuNum[-3:])
IDNum='445224199810230369' print('广东省区编号是:'+IDNum[0:4]) print('惠州市市编号是:'+IDNum[4:6]) print('出生年月日是:'+IDNum[6:14]) print('户口所属派出所编号是:'+IDNum[-4:-2]) print('性别是:'+IDNum[-2:-1]) print('效验码是:'+IDNum[-1:])
plainText=input('message:') far c in plainText: print(chr(ord(c)+3,end='')
plainText=input('message:') for c in plainText: print(chr(ord(c)+3),end='')
plainText=input('message:') for c in plainText: print(chr(ord(c)-3),end='')