藏文字符的输入与输出


"""算法导论--输入输出藏文字符
Author:Kerhy"""

def write_str():
    for i in range(0x0f00,0x0fff):
        with open('./utibet.txt','a+',encoding='utf-8') as fp:
            fp.write(chr(i)+'\n')


write_str()  #写入的时候调用

#读取文件输出到控制台:

def read_str():
    with open('./utibet.txt','r',encoding='utf-8') as fp:
        print(fp.read())


read_str()

猜你喜欢

转载自blog.csdn.net/qq_45675231/article/details/129933210