The original author charlee and original link http://tech.idv2.com/2008/11/03/python-memo/can be reproduced at will.
Basic Concepts
Python supports the plural. For example, (-5 + 4j ). Note that the virtual number unit must be written as 1j
Chapter 1 Welcome to python.
Interactive interpreter.
Compile-type programming language: Compile the program source code into the target code (machine language ). Compile the program to translate the original program into the target program and
1) forget to add (resulting in "SyntaxError: invalid syntax") at the end of the if, elif, else, for, while, class, and def declaration ")
This error will occur in code similar to the following:
Copy codeThe Code is as follows: if spam = 42
Print
Because Python is a built-in document, you can use the help function to query the usage instructions of each system function. In general, the Key Usage and attention points are clearly stated in this system document. I tried to find functional
Create Your Own Search Engine with PythonUse python to create your own search engine (1)Search for the webpage you need on a specific website. I think this is a very useful feature. However, the search system is not that simple, and providing
In windows, the commonly used tool for packaging programs written in python is py2exe. This tool only requires some scripts to package the python program into an exe file. The execution of the exe program does not require the system to install the
[Python] All the tests are over. Let's sit down and read a book. I want to count the number of lines of code I have written a few days ago. This afternoon, I spent some time to get it. The code is not very well written, let's take a look and try
# Import smtplib and MIMEText import smtplib from email. mime. text import MIMEText # define the send list mailto_list = ["root@cnseat.com ", "10118157@qq.com"] # Set the server name, user name, password, and mail suffix mail_host = "smtp.163.com"
1. simple example [python] #-*-coding: UTF-8-*-import MySQLdb db = MySQLdb. connect (host = 'localhost', user = 'root', passwd = 'root') # If the connection is successful, a connection object cur = db is returned. cursor () # create a cursor to
Access the sub-string (obtain the data of some fields in the record) solution: slice, however, you can only obtain one field [python] theline = 'I Love python' afield = theline [] print afield result Love. If you need to consider the length of the
Read IOB format and CoNLL2000 block Corpus
CoNLL2000 is the text that has been loaded with the annotation. It uses the IOB symbol to block it.
This corpus provides NP, VP, and PP types.
For example:
hePRPB----
Function of chunk. conllstr2tree ():
[Preface]Natural Language: the language used for daily communicationNLP: Natural Language ProcessingChapter 4 Language Processing and Python]1.1 language computing: Text and wordsGetting started-To obtain the expected fractional division, enter from
For details about python file operations, refer to: python File Operations
Official API: OS-Miscellaneous operating system interfaces
Below is my demo:
image_path = dir_path = file_abs_path = +
Python hexadecimal conversion binary octal decimal hexadecimalAuthor: Fang Times studioAddress: http://www.cnblogs.com/txw1958/p/python3-scale.html
Global Definition
base = [str(x) x range(10)] + [ chr(x) x range(ord(),ord()+6)]
Binary to
Before reading, you need to know somethingSome theoretical knowledge inYou canHave a certain understanding, if you have read.
Below is my demo
:
Location of the parsed XML file:
Hongten M 20 97 90
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