A simple text editor#-*-coding:utf-8-*-from sys import argv # import argv function from sys module, #"argv" is a shorthand for "argument variable" parameter variable. It is generally passed to the program by the system at the command line invocation.
The way data is persisted is: 1. Plain file unformatted write: Write data directly to a file 2. Normal serialized write: Json,pickle 3.DBM mode: SHELVE,DBM Related content:
Json
Pickle
Shelve
Dbm
Starting Time: 2018-02-23
Urllib LibraryUrllib is a python built-in HTTP request library that includes the following modules: Urllib.request (Request module), Urllib.error (Exception handling module), Urllib.parse (URL parsing module), Urllib.robotparser (robots.txt parsing
1. Python is a dynamic, interpretative, mandatory definition language.
Compiled type
Source code for conversion (compiler), such as: C + +, VB and so on.
Explanatory type
Read an explanation, for example:
Previously wrote using the standard library to use Python smtplib and email to send mail, feeling very cumbersome, long time no later forget. What Python libraries Do you brief encounter the other day? See the yagmail third-party library, the
First, what is a threadThread: As the name implies, is an assembly line work process, a pipeline must belong to a workshop, a workshop work process is a processTherefore, a process is simply used to centralize resources together (a process is just a
To understand the shades of a copy, first understand how the data is stored in memory.The storage of a variable, first the variable name plus the ID of the stored content, through the ID to find the corresponding content of the variable name,When we
1. Introduction to the list A list consists of a series of elements arranged in a particular order. You can create a list of all the letters, numbers 0~9, or names of all family members in the alphabet, or you can add anything to the list, where
Enumerate () function usage in PythonFirst out a topic: 1. There is a list= [1, 2, 3, 4, 5, 6]Please print the output:0, 11, 22, 33, 44, 55, 6Print output,2. Reverse list to [6, 5, 4, 3, 2, 1]3. Select the even number in a and the result is [4, 8, 12
The Python tuple contains the following built-in functions
Serial Number
Method and Description
1
CMP (Tuple1, Tuple2)Compares two tuples of elements.
2
Len (tuple)Counts the number of
Python contains the following functions:
Serial Number
function
1
CMP (List1, List2)Compare two elements of a list
2
Len (list)Number of list elements
3
Max
First, the execution process of creating the classThe understanding of the meta-classWhat is a meta-class? The meta-class that inherits type in Python3Examples of meta-classes# Way One Class MyType (type): ' Inherits type ' is Meta class ' Def
Pandas has two data structures, one is series and the other is DataframeFrom matplotlib import Pyplot as PltImport NumPy as NPImport Pandas as PDFrom NumPy import nan as NAFrom pandas import DataFrame, Series%matplotlib InlineSeries is essentially a
Lists ListRepresentation method:list_1=["Luo", "gu", 2,5,6]In a list, it can be a string, a number, or a mixed-typeFor a list operation, the following functions are available:#1, CMP (LIST1,LIST2): An element used to compare two lists#2, Len (list):
#cyclic synthesis application 1.#str = "Hello,world" to invert the string to displaystr ="Hello,world"Temp="" forCinchstr:temp= C +TempElse: Print("string reversal Complete:", temp)#Circular Integrated Application 2#print 1.. An even number
1. Output string:Print (" string ")2. Open the document file with python :CMD Command indicatorCD C + + where cd is Chang directory Change directory, with tab key to quickly find the target fileDir View current directory file list3, thecmd
Cookie and session, cookiesessionCookie and session 1. cookie
Cookies are key-value pairs stored locally in the browser. It is included in the Response Header during transmission between the browser and the server. You can set cookies on both the
Use python to automatically add version numbers to css and js file links in html,
The traditional method of adding version numbers to file links is to use gulp-rev. The solution proposed here is to use python to replace gulp-rev.
import osimport
Python framework-Virtual Environment configuration, python framework-virtual
During the development process, different projects are often to be developed on the same computer. Different projects may require packages of different versions. To solve
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