The difference between Python3.0 and previous versions
(1) Print. The 3.1 version is enclosed in parentheses (print ("abs"), similar to Java) and version 2.0 is not used.
(2) input replaces the 2.0 version of Raw_input;
(3) version 3.0 does not have a file function, to open the document to use OPEN;F = open (Shoplistfile, ' WB ');
(4) without the Cpickle module, use the Pickle module;
(5) When using the Pickle.dump () method, the read operation of the Open file is "WB", when using the Load method, if the file is "RB",
(f = open (Shoplistfile, ' WB '); f = open (Shoplistfile, ' RB '); Shoplistfile is filename)
Otherwise there will be an error:
Traceback (most recent):
File "d:/pycharmprojects/project1/pythonsrcfile/schoolmember.py", line +, in <module>
Pickle.dump (SHOPLIST,F)
Typeerror:must is str, not bytes
The difference between Python3 and previous versions