Tools to prepare:Installing the Python software: https://www.python.org/Fiddler grab package software:http://blog.csdn.net/qq_21792169/article/details/51628123Brush Blog Access to the principle is: Open a page blog access to increase the number of
Third Week work content:1. List the user name of all logged-in users on the current system, note: The same user logged in multiple times, only once.[email protected] ~]# who | Cut-d '-f1 | Sort-u CentOS Liu Root2. Remove the information about the
Python's advanced Application (ii) Common module learningKey points to learn in this chapter:
Definition of Python module
Time &datetime Module
Random module
OS Module
SYS module
Shutil Module
Configparser Module
Problem: Use regular expressions to match text patterns to identify the longest possible match to find the shortest possible matchWorkaround: Add after the * operator in the matching pattern. ModifierImportRe#Sample TextText ='computer says "No."
First, TCP/IP-related knowledge tcp/udp provide process address, two Protocols independent protocol Tcp:transmission Control Protocol Transmission Protocol, connection-oriented protocol, communications before communication channels (virtual link)
Understanding of FunctionsProcess-oriented: according to the business logic from top to bottom writing code function: A function code is encapsulated into the function, you will not have to repeat the writing, only call the function function is your
After installing numpy,scipy and matplotlib, Python can become a very sharp scientific tool. The installation of the three libraries on the internet is very good, but most of the problems encountered by the people is not how to install, but after
Problem: Perform a variety of calculations (such as minimum, maximum, sort) on the data in a dictionary.Solution: Use ZIP () to "invert" the key-value pair of the dictionary to a value-key pair sequence.For example, the following dictionary holds
Problem: Look for two dictionaries in the middle of the same place (same key, same value, etc.)Solution: Use the keys () or the items () method to perform common collection operations (such as seek a set, intersection, and difference sets)>>> a={'x':
Question: Want to make a limited history of the last few records during iterations or other forms of processingSolution: Select Collections.deque.The following code makes a simple text-matching operation on a series of lines of text, outputting the
The n elements are decomposed from an iterative object, but the length of an iterative object may exceed N, and an exception of "too many decomposition values" appears.Use "* expression" to resolve the problem:Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb,
First, prefaceBecause sometimes in the work to the domain name resolution and obtain the relevant IP attribution information, so write the script, convenient for their own query use.Ii. contents of the
The string type is a very important type in Python and is usually expressed in the form of a character in the middle of a quotation mark, unlike in other languages, where the double quotation marks ("") in Python are not distinguished from single
Recently began to learn Python, the teacher let the deployment of the Python environment, deployed on the x86 platform is no pressure, think can not be a set of Raspberry Pi. Because using the Raspbian system and Debian is almost a problem when
Python beginners (5) and python beginners
14. Regular Expressions
Regular Expressions are powerful tools used to process strings, but they are not unique to Python. Many programming languages support regular expressions, which are rarely
Python local variables and global variables global, pythonglobal
When you declare variables in the function definition, they have no relationship with other variables with the same name outside the function, that is, the variable name isLocal. This
Development History of operating systems and Python and python
I. Operating System Development History:
Operating System: What is an operating system? The first thing we think of is the computer, the so-called Windows8, Windows7, or XP system and
Share dictionaries in python and share dictionaries in python
The keys in the dictionary must meet the following two conditions:
1. Each key can correspond to only one item, that is, it is not allowed when one key corresponds to multiple values
Python magic method-Explanation of attribute conversion and class expression, and explanation of python
Type conversion magic
The magic of type conversion is actually the result of implementing factory functions such as str and int. Usually these
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service