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.
1. The Definition Of Swift Closures. Closures are described in the Swift development documentation as functional independent modules that can be passed and referenced in your code. Closures in Swift […]
String interpolation is a way to construct new strings that contain constants, variables, literals, and expressions. Each entry of the string literal you inserted is wrapped in parentheses prefixed by […]
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 […]