前言 数据量偏小时,用txt文本保存数据比较合适,以-进行区分,为什么不用:呢?原因是,我们在使用数据时,会存在url地址的情况,里面宝行:所以用-进行替代 此处附上代码 #encoding=utf-8 def load_dict_from_file(filepath): _dict = {} try: with open(filepath, 'r') as dict_file: for line in dict_file: (key, value) = line.strip().split('
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using Microsoft.Office.Interop.Excel; using Syste
vim是一个功能强大的全屏幕文本编辑器,是Linux/Unix最常用的文本编辑器,其作用是建立.编辑.显示文本文件.vim的特点是没有菜单,只有命令. vim主要有三种工作模式,分别为命令模式.插入模式.编辑模式.三者的关系可由下图来表示: 1 vim常用操作 (1)插入命令 命令 作用 a 在光标所在字符后插入 A 在光标所在行尾插入 i 在光标所在字符前插入 I 在光标所在行首插入 o 在光标下插入新行 O 在光标上插入新行 (2)定位命令 命令 作用 :set nu 设置行号 :set n