摘要:
文件操作 能调用方法的一定是对象 # open+r 打开已有文件,又称为操作句柄f=open('poem1', 'r', encoding='utf8')# read默认英文、汉字皆为一个字符data=f.read(15)print(data)f.close() # open+w 清空已有文件内容, 阅读全文
posted @ 2020-03-07 11:20
wtzxxy
阅读(154)
评论(0)
推荐(0)
摘要:
编码解码 编码(encode):将Unicode字符串(中的代码点)转换特定字符编码对应的字节串的过程和规则 解码(decode):将特定字符编码的字节串转换为对应的Unicode字符串(中的代码点)的过程和规则 encode unicode to any code decode any code 阅读全文
posted @ 2020-03-07 10:58
wtzxxy
阅读(195)
评论(0)
推荐(0)
摘要:
三层循环 # __author:XY# date: 2020/3/7abcd = { 'A': { 'AA': { 'AAA': { 'AAAA': {}, 'AAAB': {}, 'AAAC': {}, 'AAAD': {} }, 'AAB': { 'AABA': {}, 'AABB': {}, 阅读全文
posted @ 2020-03-07 08:10
wtzxxy
阅读(457)
评论(0)
推荐(0)

浙公网安备 33010602011771号