摘要:
We have used many of Python’s built-in types; now we are going to define a new type. As an example, we will create a type called Point that represents... 阅读全文
摘要:
Pickle translates almost any type of object into a string. pickle.dumps takes an object as a parameter and returns a string representation. ... 阅读全文
摘要:
Files are organized into directories (also called ‘folders’). Every running program has a ‘current directory’, which is the default directory for most... 阅读全文
摘要:
The argument of write has to be a string, so if we want to put other values in a file, we have to convert them to strings. The easiest way to do that ... 阅读全文