fr = open ('win.txt',mode='r',encoding='utf-8')
win=fr.read()
print('明文:'+ win)
print('密文:',end='')
for c in win:
print(chr(ord(c)+3),end='')
fw = open('bili.txt',mode ='a',encoding='utf-8')
for c in win:
print(chr(ord(c)+3,),end='')
fw.write(chr(ord(c)+3))
fr.close()
fw.close()
![](https://images2018.cnblogs.com/blog/1377922/201805/1377922-20180528154344346-2010142044.png)
name1 = 'phone'
name2 = 'ball'
superman = ['strong','handsome','tall','humorous']
print(superman[0])
print(superman[-2])
print(len(superman),superman)
![](https://images2018.cnblogs.com/blog/1377922/201805/1377922-20180528165008173-683285339.png)
superman.append('bay')
superman.insert(1,'jack')
![](https://images2018.cnblogs.com/blog/1377922/201805/1377922-20180528170328183-1762244281.png)
superman.pop(0)
superman.pop(-1)
![](https://images2018.cnblogs.com/blog/1377922/201805/1377922-20180528170544321-1202281548.png)
![](https://images2018.cnblogs.com/blog/1377922/201805/1377922-20180528170732327-471984949.png)