crazy-heng
天降大任于斯人也...

导航

 

1、读取文件

     语法: f = open(file = '/Users/crazy_heng/PycharmProjects/untitled/day1/usernam',mode = 'r',encoding='utf-8')

        file = '/Users/crazy_heng/PycharmProjects/untitled/day1/usernam # 表示username这个文件的路径

        mode = 'r' # 表示只读

 

posted on 2018-04-06 10:20  killer-147  阅读(126)  评论(0编辑  收藏  举报