JavaScript is a programming language, the browser has built-in JavaScript interpreter, so in the browser according to the JavaScript language rules to write the corresponding code, the browser can explain and make corresponding processing.first, how
class:A class of things with the same attributes and skills.object:the specific performance of the class.class keywordClass Name: (class name should be capitalized first)code block.country = ' China ' first part: Static variable, static fielddef
Closures:Two nested functions, external functions return the internal function of the argument, external function?def external function (parameter):def intrinsic function ():Passreturn intrinsic functionThe difference between him and the function:1.
The Shutil module provides a number of advanced operations on files and folders. Features that support file copying and deletion are especially available.#copies the contents of the file object Fsrc to the file class object fdst. Length (optional
Print ('I am%s My hobby is Alex'%'lhf')% and% stitchings represents a stringD means shaping numbersFloating-point numbers are decimals.Print ('I am%.1f my hobby is Alex'%97.12)A. XF x represents the number of digits after the decimal pointStrings
PYTHON-M Module NameDirect the current directory "as the running path of the module, without the need for import to run directlyFor example:Python-m simplehttpserver #python2中启动一个简单的http服务器python-M http.server #python3中启动一个简单的http服务器The above
Chapter Content
Introduced
The forming process of the adorner
Open Closure principle
Talking about the main function of the adorner and the fixed structure of the adorner
Adorner with parameters
Multiple adorners
1, Time module: times, DateTime;1), Timestamp (SEC) 1970 00:00:00 defined as 0;time.time ()2), formatted time string3), tuple (struct_time) 9 elements: Year, month, day, time, minute,seconds, weeks, the day of the year 0-6, tm_isdst=0;access Method:
Os.listdir (Path=none)--Output All files under current path os.listdir ()#不给参数默认输出当前路径下所有文件Os.stat (Path, *, Dir_fd=none, follow_symlinks=true)--#查看文件状态信息 Follow_symlinks True returns information about the file itself, flase and, if it is a soft
The use of dichotomy to find premises must be ordered sequencedefSearch (List,val): Start=0 End= Len (list)-1#determine if the number is not in the list ifValinchlist:#Loop until the number is found, return Exit Function while1: Mid= Int (
driver = webdriver.Firefox(executable_path = "d:\\geckodriver")driver.get("https://www.baidu.com")driver.get_screenshot_as_file("d:\\a\\tu.jpg")driver.get_screenshot_as_file("d:\\a\\tu.png")Description: The console error while performing JPG, but
Python Object-oriented initialProcess-oriented program design is the core of process (pipeline thinking), the process is to solve the problem of the steps, process-oriented design is like a well-designed pipeline, consider when to deal with what
use tag to locateTag is labeled, not commonly usedFor example: Baidu's input box tag is inputwill eventually error, because Baidu Home input tag too much
driver =
02_python Foundation _day02
What does the comment in Python do? Single-line and multiline commentsSome code is annotated in the program to enhance the readability of the program.Single-line comment: Start with the # number, add a space, followed
Tag: Item key value pair class COM add div [] 127.0.0.1 OpenWrite an. ini configuration fileCreates a new Config object, assigns a dictionary to the section, and then writes the file.Import Configparserconfig=configparser. Configparser ()
Use Python to implement a simple if Loop statement:Password need to use ciphertext:Import Getpass call Getpass library for password ciphertext input_username = ' Alex '_password = ' 123 'Username =input ("username:")Password = getpass.getpass
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