1.1 Data Type1.1.1 integerPython can handle integers of any size, including, of course, negative integers, which are represented in the program in the same way as mathematically, for example:1,-8080, 0, and so on. computer because of the use of
One. Object-oriented three major features:PolymorphicMultiple type parameters can be any type of Pythondef func (ARG)Print (ARG)obj = func (int)obj = func (str)obj = func (dict)PackagingInheritedTwo. Object-oriented MembersFieldClass Foo:#字段 (static
The For loop is used on a number of cycles.The while loop is used on a conditional loop.The while loop, knowing that the expression is false, exits.While loop, the expression is a logical expression and must return a true or falseGrammar:While
Python functionsI. BackgroundBefore learning the function, always follow: process-oriented programming, that is, according to the business logic from the top to the bottom of the implementation of functions, often with a long code to achieve the
First, the fieldFields include: normal fields and static fields, they differ in definition and use, and the most essential difference is where the memory is stored in different places,
Normal field belongs to object
Static fields
I. INTRODUCTIONSubprocess was first introduced in version 2.4. Used to generate child processes, and to connect their input/output/errors through pipelines, and to get their return values.# subprocess is used to replace multiple old modules and
Python path, process, thread, and co-pathThe content of this section
process, and thread differences
CPU Operating principle
Python Gil Global Interpreter lock
Thread
Grammar
Join
Lock\rlock\ signal volume of the
JSON & Pickle Module (serialized)Both JSON and Pickle are serialized memory data to a fileThe difference between JSON and Pickle is:
JSON is common to all languages, but can only serialize the most basic data types (strings, dictionaries,
When the parameters of a Python function are indeterminate, you can use *args and **kwargs to refer to an indefinite number of arguments.The difference between the two is that *args is a tuple (tuple), and **kwargs is a dict (dictionary). To put it
In the recent study of Python, learning resources are online video tutorials, novice tutorials, and official Python document tutorial. Although the basic syntax of Python has been understood, there is no real sense of outputting the code that you
A web crawler is a program that crawls data on the web and uses it to crawl the HTML data of a particular webpage. While we use some libraries to develop a crawler, using frameworks can greatly improve efficiency and shorten development time. Scrapy
Python-full resolution of nested list and python-full resolution
A layer-3 nested list m
M = ["a", ["B", "c", ["inner"]
Basic data items a, B, c, and inner must be parsed.
Basic data extraction methods:
For I in m:
Print I this can only
Python implements the port forwarding and redirection example under the TCP/IP protocol, pythontcp
First, we use webpy to write a simple website, listen to port 8080, and return the "Hello, EverET.org" page.
Then we use our forwarding. py to
Basic Python knowledge and basic python tutorials
Python loop, if you already have programming experience, these are all trivial for you.
Names = ["Zhang San", "Li Si", "Wang Wu"] for name in names: print (name)
Python loops include not only the For
Send an email to the Sendmail python file,
1. Use python to write the email sending code:
Def sendmail (): import smtplib from email. mime. text import MIMEText from email. utils import formataddr msg = MIMEText ('mail content', 'plain ', 'utf-8')
Django-QueryDict object, django-querydict
InHttpRequestIn the object, the GET and POST attributes GET bothDjango. http. QueryDictThe created instance. This is a dictionary-like class customized by django. It is used to process multiple values with
Python3.5 use tkinter to create notepad, python3.5tkinter
Tkinter is a graphical interface library for tk in Python, allowing you to easily design graphical interfaces and program interactive operations. The advantage of tkinter is that it is easy
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