VariableUsed to store things#定义变量Name=' Feifei '#定义变量, stringAge=18.9#整型或者小数定义变量不需要加引号Print (name)Print (age)Name2= "What ' s your name"#里面有单引号外面就用双引号Name3= ' You look very handsome'#里面是双引号外面就用单引号Name4=""you look very handsome
Dictionary operationsA dictionary is a set of "key-value pairs" enclosed by a pair of curly braces, and each key-value pair is an element of the dictionary, and the elements are unordered in the dictionary, with the following common actions:info = {'
These two days in the Python bottle Framework for the development of a background management system, the interface convention using RESTful style requests, the front end uses jquery Ajax to interact with the interface, the use of post and get
Check to see if your HTTP header has the following header information: "Accept-encoding": "Gzip, deflate"This information represents the local can receive the compressed format of data, and the server in the processing of large files are compressed
This machine: python3.51. Need to install Configerparser "Py2 is Configparser"2. Writing codeBefore running#Coding:utf8Importconfigparserconf=Configparser. Configparser () Conf.read ("F:\\python\\clstudydemo\\util\\config.ini")#Gets the value of the
Import Osimport Os.pathrootdir = "Traversed folder path" # indicates the folder being traversed for Parent,dirnames,filenames in Os.walk (rootdir): # Three parameters: return 1. Parent Directory 2. All folder
Directory:First, the HTMLSecond, CSSFirst, the HTML1. Overview HTML is an abbreviation for the English Hyper Text mark-up Lang (Hypertext Markup Language), which is a standard language for making Web pages, equivalent to a set of rules for defining
python 2.7.12rc1 (v2.7.12rc1:13912cd1e7e8, jun 12 2016, 05:57:31) [MSC v.1500 64 bit (AMD64)] on win32type "copyright", "credits" or "license ()" for more information.>>> str1= "I love fish" >> > str1[:6] ' i love ' >>> str= "111eee"
Modules (module)Python has a concept called module, which is similar to a header file in C and a package in Java, such as in Python to invoke the SQRT function, which must be introduced into the math module with the Import keyword. In layman's terms,
It is time to talk about examples, this time we are talking about Python dedicated class method used by the example tutorial, there are a lot of OH.
1.__getitem__ Special method
1 >>> map = {' name ': ' C little plus '}2 >>> map.__getitem__ ("name")
Python common built-in modules: xml module and pythonxml Module
Xml can be used to tag data and define data types. It is a source language that allows you to define your own markup language. The structure is similar to HTML hypertext markup language.
Learning notes TF013: convolution, span, border filling, convolution core, learning notes tf013
Convolution. Two input tensor (input data and convolution kernel) are involved in convolution. The output represents the information tensor from each
Python uses defaultdict to read columns of files,
This example describes how to use defaultdict to read columns of a file in Python. We will share this with you for your reference. The details are as follows:
#!/usr/bin/python"""USAGE: python *.py
Python _ introduction to string sharding, indexing, and string Methods,
This article mainly introduces the sharding, indexing, and string methods of strings.
String sharding and indexing:
String [X] can be used for sharding and indexing. Sharding,
Python converts ansible configuration to json format instance code, ansiblejson
Python converts ansible configuration to json format instance code
An example of the ansible configuration file is as follows. This configuration file is not suitable
Python entry _ condition control (detailed description) and python explanation
The condition control is actually the use of if... else... (if the conditions are true, do...; otherwise, do ...).The basic structure is:
For more information, see the
For more information about pyhton, see pyhton.
It is currently disorganized and will be supplemented later
1. identifier
(1) The identifier is case sensitive.
(2) The identifier must start with a letter or underline and may contain letters,
Example of Web Page Information capturing by Python crawler [URL and regular expression module] And python Crawler
This example describes how to use a Python crawler to capture web page information. We will share this with you for your reference.
Use the python library itchat to implement the automatic reply function, pythonitchat
Preface
On the forum, you can see Python login and automatic sign-in to learn about a new Python Library: itchat.
Using the Python library itchat, You can
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