The following describes the Python-related issues comprehensively. It is an object-oriented, literal translation computer programming language and also a powerful and complete general-purpose language. Currently, technologies based on this language are developing rapidly, with a sharp increase in the number of users and a large number of related resources.
1. Use pickle to save/extract data in Python. This method is simple and can restore the original data type. In particular, the storage of some large matrices can be put into a dictionary and then stored in the entire dictionary. Suitable for various Python extension objects.
2. python: Use zlib for compression and decompression. This section describes the zlib compression and decompression of the standard module. However, it seems that the length of the compressed string has become longer.
Strange, fortunately, the compression effect is good. You can save it with the preceding pickle and compress it. You can also compress some private files and protect your privacy. Others don't know what type of files you are using.
- What is the Python interpreter and its usage?
- In-depth analysis of Python Web applications
- How to install Python correctly?
- Analysis of Python global variables in Python
- Easy to learn PythonWin Module
3. zipfile of the python module should be a good choice if you still want to use general-purpose compression. Currently, open-source software 7-zip is popular, so there is no doubt about its versatility. In addition, the author of this space has a lot of articles about Python. The name of the space is called "Python introduction and application ".
4. Think about how to initialize multi-dimensional array code in Python. Using extended Python to define a 2-dimensional array is not as simple as C ++, and a lot of code needs to be written, this section describes how to initialize a 5 × 3 two-dimensional array.
In this case, multilist = [[0 for col in range (5)] for row in range (3)]. This website is called the home of scripts. Its Python area also has many introductory materials and examples of some common modules. For details, refer.
5. The string operation functions in python collect the string operation functions and the string type operation functions. Although the strings are much used, some functions seem unfamiliar, this article is fully collected and can be checked as needed.
6. The assignment and copy functions in the python copy module copy and deepcopy to easily copy objects.
7. Python extension 8.1-"conquer Python: basic language and typical applications" teaches you how to use C to expand Python in VC and VS2005, other articles found on the Internet are not detailed in this article. If you are not familiar with VC or VS2005, it is not easy to build a dll on windows, however, the silly teaching in this article will be very easy to use.
8. Use C/C ++ to expand Python. If a simple extension module of the previous article is successfully compiled, you should try to compile a complicated module. This article is like this, contains four functions. But directly copy the code in the past, and the import operation may fail, because the return type of a function in the Code is wrong. You can find it by referring to the previous article. For more information, refer to this article.