Last written the login program is disorganized, I can not see, the teacher made the comments as followsSince the current dictionary is not too familiar with the first time,And then joins in a while loop really worksBut the sense code is still more
OS Module 1 os.getcwd () Gets the current working directory, which is the directory path of the current Python script work 2 os.chdir ("DirName") changes the current script working directory, equivalent to the shell under CD 3 Os.curdir returns the
Tuples: (tuple) elements cannot be modified, cannot be added or deletedWhen writing tuples generally, it is recommended to add a comma at the endCan index valuesYou can slice and take valuesTuple-level elements cannot be modified, but can be
1. Install PythonDownload the latest version of Python3 's installation package from the official Python website: http://www.python.org.Reference: http://www.cnblogs.com/yaoyaojcy/p/7349019.html2. Installing PycharmPycharm installation process
1. Fromkeys () creates a dictionary from a sequence and specifies a uniform valueDIC = Dict.fromkeys (['a'b' 'C ' ' def ' )print(DIC)Output: {' A ': ' Def ', ' B ': ' Def ', ' C ': ' Def '}2. Get () Gets the value according to key, when key does not
Introduction to the basic concepts of serialization:01What is serializationSerialization: Convert in-memory data into an intermediate format (Json/pickle) and store it on a hard disk for permanent storageDeserialization: Read from a file
Singleton --an object created by a class that has only one instance in the system
Defines a class property , the initial value None , that is used to record a reference to a singleton object
overriding __new__ method
If the class
# This is a learning note for the Liaoche teacher Python tutorialSockets are an abstract concept of network programming. Usually we use a socket to indicate "open a network link", while opening a socket needs to know the destination computer's IP
# This is a learning note for the Liaoche teacher Python tutorialFor an unknown encoded bytes, to convert it to STR, you need to know how to encode the bytes. We can use Chardet This third-party library to detect the encoding1) Direct detection
One, str commonly used methods are: (In the Pycharm interface, in the location of the method by Ctrl + Left to view the details of the method of use information )Len,count,
# This is a learning note for the Liaoche teacher Python tutorialMost of the time, data read and write is not necessarily a file, but also can read and write in memory.1 , StringioStringio, as the name implies, reads and writes STR in memory.1.1 ,
# This is a learning note for the Liaoche teacher Python tutorial1. OverviewTo write maintainable code, we group many functions into separate files so that each file contains relatively few code, and in Python, a. py file is called a module.1.1 ,
Overall Note: Ctrl +?1. Operators+-*///(pick-up)* * (Power)% (redundancy)Determine if something is contained in something: in NotNot equal to:<>!=A=a+1 equals A+=1.A=a-1 equals A-=1.a=a%1 equals A%=1.The result is a valueArithmetic operationsA = 10 *
Today the leader asked why with Golang, colleagues to answer grammar simple, language new, support high concurrency. That high concurrency in the end how to achieve, the following article is mainly about how to use Golang to write high-concurrency
Scrapy, a Python-based web crawler framework that crawls information from the Web, is a good way to get data. So I want to install the next look.
Go to its official website, install the introduction page
There are 3 kinds of loading method, one
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