文件操作,列表实例NiceHexSpiral

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

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

import turtle
turtle.speed(10)
colors = ['#FFB6C1','blue','yellow','red','green','orange']

for i in range(200):
    turtle.pencolor(colors[i%6])
    turtle.forward(i)
    turtle.left(59)
turtle.done()

文件操作,列表实例NiceHexSpiral_第1张图片

你可能感兴趣的:(文件操作,列表实例NiceHexSpiral)