02_python Foundation _day04
The basic format of the while loopInitializing countersWhile condition:Code that satisfies the criteria to be executed repeatedly......modifying counters
Understand the effect of break and continue two keywords,
" Connector characters ". Join (list or tuple or string or dictionary)Returns a string that is spliced with a connectorIf the object is a list, tuples are spliced in a subscript elementIf the object is a string, it is a word element that is spliced
The import statements in Python are for importing modules, and there are a large number of modules available in the Python module library, which you need to import into the current program using an import statement.Import Statement functionThe
The client can execute an import or from statement. If the module has not yet been loaded, the two statements will search, compile, and execute the module file program. The main difference is that import reads the entire module, so it must be
Operating system: WIN10 1709 X64Python version: 3.6.5Dependent modules: PIL, TESSEROCR.It is necessary to note that when you install the CAPTCHA identification module on a Windows system PowerShell through the PIP3 install TESSEROCR, you need to
This experiment uses the Telnetlib libraryFirst, the topologySecond, the environmentPython 2, Cisco-router, Kali-linuxThird, the configuration!! Scripts and IP address files are in the same directory3.1. IP Address3.2. Python Backup
The parameters of the Os.walk directory traversal Os.walk are as follows:Os.walk (Top, Topdown=true, Onerror=none, Followlinks=false)which-Top is the directory to traverse.-Topdown represents whether to traverse from top to bottom or from bottom to
First, Python introductionPython is an object-oriented, interpreted computer programming language, invented by Dutchman Guido van Rossum in 1989, and the first public release was released in 1991.Description of the compiled and interpreted languages:
Base: 1. The first sentence of Python usage
Python does not limit the suffix name, it can be arbitrary
When importing a module, if it is not a. py file (the file suffix later is py)
Usage of 2.input:
Wait forever until the
There is a Gil (Global interpreter Lock) in the CPython interpreter, regardless of how many threads, how many CPUsHis role is to ensure that only one thread can execute the code at the same time, which makes it impossible for us to parallelize when
03_ Object-oriented _day01
An object-oriented abbreviation?Object-oriented programming--object oriented programming shorthand OOP, is a programming idea or method
Object-oriented and process-oriented differences?Process-oriented is an early
03_ Object-oriented _day03
The concept of class properties and instance properties.A class property is a property defined in a Class object (a class is a special object) and is typically used to record the characteristics associated with this
1---There are two ways python gets input from the keyboard:2 3 4 input and raw_input comparison:5 6 #1.input function: Need to enter in a valid Python expression form7 8 Example 1:9>>> name = input ("What is your name?")TenWhat isyour name? One A
SYS module1 sys.argv # in the command line argument is an empty list, the path of the program itself in the first list element in the other # exits the program, exit gracefully (0)3 Sys.version # get version information for Python interpreter #
Request Library UrllibUrllib is mainly divided into several partsUrllib.request Sending requestsUrllib.error the exception that occurred during the processing of the requestUrllib.parse Processing URLsUrllib.robotparser parsing Robots.txt------the
There are many programming languages, but each language has a corresponding keyword, Python is no exception, it comes with a keyword module for detecting keywords.Keyword listEnter Python interactive mode to get a list of keywords:>>>Import Keyword>>
Extended notation in Python regular expressions It's hard to digest it all at one time and record your own understanding here. The extended expression is a form (?) pattern that implements different semantics depending on the , in the following ways:
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