1.print ,3.1版本之后要用括号括起来(print("abs"),类似于java)而2.0版本不用。
2.input代替了2.0版本的raw_input;
3.3.0版本没有file函数了,要打开文件要用open;f = open(shoplistfile,'wb');
4.没有了Cpickle模块了,使用pickle模块;
5.异常处理excpet语句,由except ShortInputException, x:改为except ShortInputException as x:
6.使用pickle.dump()方法时,打开文件的读操作要是“wb”,使用load方法时,文件要是“rb”
如:f = open(shoplistfile,'wb');f = open(shoplistfile,'rb');shoplistfile为文件名)