字符串操作:凯撒密码。列表及其基本操作。

id='440682199901084345'
area = id[0:6]
birthday = id[6:14]
sex = id[-2]

print(area,birthday,sex)

if (int(sex) % 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('明文:')
for c in s:
    print(chr(ord(c)+3),end='')

猜你喜欢

转载自www.cnblogs.com/2han92hu0m1n9/p/9079532.html
今日推荐