Sylvia^^

导航

文件操作

fr = open('qcj.txt',mode='r',encoding='utf-8')
qcj = fr.read()
print('明文:'+qcj)
print('密文:',end='')

fw = open('cipherText.txt',mode='a',encoding='utf-8')
for c in qcj:
    print(chr(ord(c)+3),end='')
    fw.write(chr(ord(c)+3))

fr.close()
fw.close()

 

name1 = 'Anny'
name2 = 'Sylvia'
classmates = ['Luna','Gran','Tom','Logo']
classmates.append('Alla')

print(len(classmates),classmates)

name1 = 'Anny'
name2 = 'Sylvia'
classmates = ['Luna','Gran','Tom','Logo']
classmates.append('Alla')
classmates.insert(1,'Vivi')
classmates.pop()
classmates.pop(4)
print(len(classmates),classmates)

posted on 2018-05-28 17:13  Sylvia^^  阅读(127)  评论(0编辑  收藏  举报