fr =open('plainText.txt',mode='r',encoding='utf-8')plainText=fr.read()print('明文:'+plainText)print('密文:',end='')fw =open('dearText.txt',mode='a',encoding='utf-8')for c in plainText: print(chr(ord(c)+2),end='') fw.write(chr(ord(c)+2))
cars=['Jaguar','Benz','Lamborghini','Bugatti']cars.append('Maserati')cars.pop()print(cars)
cars=['Jaguar','Benz','Lamborghini','Bugatti']cars.append('Maserati')print(len(cars))
cars=['Jaguar','Benz','Lamborghini','Bugatti']cars.append('Maserati')cars[1]='Jaguar'print(cars[1])