Usually in Python, we use multi-threading or multi-processing to implement concurrent programming. Computing-intensive tasks for cpu are usually implemented by multi-processor because of GIL, while io-intensive tasks can be scheduled […]
Python requests module is a http client library, which is similar to urllib and urllib2. It is more convenient than urllib and can save us a lot of work.
The json library can parse JSON from strings or files. The library parses JSON format string and turns it into a Python dictionary or list. It can also convert Python […]
1. Use “+” Operator To Merge List Directly. >>> list_1 = [‘java’,’python’,’mysql’] >>> >>> list_2 = [100, 99, 101] >>> >>> print(list_1 + list_2) [‘java’, ‘python’, ‘mysql’, 100, 99, 101] […]
This article list some python tricks you may use in python development. It is very useful for you to understand python coding.
1. Variable Scope. Generally, variables defined outside of the function are called global variables, and variables defined inside the function are called local variables. Global variables are available in all […]
When i run my python code, i meet an import error. The error message is : ImportError: No module named setuptools. The reason for this error is because we do […]
1. Class. The concept of classe, which occurs in many programming languages, is fundamental to object-oriented programming and is easy to understand. Class is used to abstract the common characteristics […]
I use eval() and exec() function in recent python development, and i am not sure which function to use in which scenario, so i investigate python’s document and write down […]
When i import python ssl module just after python is installed, it is prompted that ssl module cannot be found like below. This article will tell you how to resolve […]