06 2017 档案

摘要:>>> str = "世界你好!" >>> b = str.encode('utf-8') >>> type(b) >>> b b'\xe4\xb8\x96\xe7\x95\x8c\xe4\xbd\xa0\xe5\xa5\xbd!' >>> b.decode('utf-8') '世界你好!' 阅读全文
posted @ 2017-06-30 16:52 tec2019 阅读(180) 评论(0) 推荐(0)
摘要:编辑 /etc/apt/sources.list 添加163镜像源 apt-get update 进行更新 dpkg-reconfigure locales 选择 en_US.utf-8 utf-8 和 zh_CN.utf-8 utf-8 、zh_CN.gbk2312 确定后默认选择 zh_CN a 阅读全文
posted @ 2017-06-07 15:39 tec2019 阅读(296) 评论(0) 推荐(0)
摘要:#!/usr/bin/python # -*- coding: utf-8 -*- with open('e:/123.txt') as fp:row = fp.readlines() #打开并读取所有数据行到列表后赋值给变量 row Category = [] [Category.append(row[i]) for i in range(len(row)) if row[i] not in... 阅读全文
posted @ 2017-06-01 16:00 tec2019 阅读(155) 评论(0) 推荐(0)