摘要: 1、文件操作:如何用python处理一个文件 打开方法:1、文件路径,2、编码方式:utf-8,3、动作mode,读,读写,写读,。。。。 1 #f1 = open('路径',mode='r',encoding='utf-8') 2 #content = f1.read() 3 print(cont 阅读全文
posted @ 2018-04-17 15:26 张腾飞♂ 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 1、int bit_lenth 十进制转换成二进制的有效位数 2、str upper(),lower() 全大写,全小写 capitalise()首字母大写,其他字母小写 strip() 去除空格,换行符,制表符,指定字符等 split()分割,str >list replace()替换, star 阅读全文
posted @ 2018-04-17 13:40 张腾飞♂ 阅读(179) 评论(0) 推荐(0) 编辑