I have heard of Python, a powerful scripting language. I decided to start learning it today. After all, it is also necessary to learn a scripting language.
The first step is to start with the classic ebook "a byte of Python" v1.92 (for python 3.0.
ArticleDirectory
1. constants:
2. Quantity:
3. String:
Next: Python Learning (1) 3. Basic Concepts 1. constants:
A literal constant is a number such as 5, 1.23, and 9.25e-3, or like 'this is a string', "It's a string! . They are
ArticleDirectory
1. Self
2. Class
3. Object Methods
4. _ init _ method:
5. Methods of classes and objects
6. Inheritance
9. Object-Oriented Programming
So far, in ourProgramWe all design programs based on the function or
I flipped through a python book and tried it at will.ProgramAn error occurred. Python 3. X and 2. x have changed some things, making beginners depressed.
1. Print has a function in 3. X and needs to be written as print (...)
2. When tkinter is
1. Create a python Development Environment
2. The first PythonProgramOr starting from Hello World
3. debug the python Program
. Create a python development environment;
The Python Development Environment used here is the eclipse +
Why install easy_install?Under normal circumstances, if we want to install a third-party extension package for python, We must download the compressed package, decompress it to a directory, open the Directory through the command line or terminal,
1. Try {} catch {} in Python {}
2. Raise exception
3. try... try t... else ..
4. Finally Blocks
1. Try {} catch {} in Python {}
The keyword for exception handling in python is different from that in C #. The key for using try and
You can use the following in the struct package in Python to convert:
1. byte order:
Character
Byte order
Size and alignment
@
Native
Native
=
Native
Standard
Little-
I have previously posted an article about converting the Sina Weibo ID of PHP.ArticleCurrently, my project uses python, so you need to translate this function into a Python version.CodeThe following is relatively simple:
D = "0123456789
When you want to log something, C pre-processor macros_ Function __And_ Line __Are quite helpful (Althogh the first is a GNU ExtensionFor GCC, afaik). Python have_ Name __Pseudo-variable withCurrent namespace, but isn' t quite helpful when you want
See http://dirtsimple.org/2004/12/python-is-not-java.html
Python is not Java below briefly record some of the ideas mentioned by the author 1. do not convert static methods in Java to class methods in Python (Note: methods defined in classes
'''
Created on 2011-4-30 @ Author: xuqiang''' # Open File # Open (file, Mode) # File: the file to be opened # Mode: Open File mode, 'R' the file will only be read # 'W' only writing and existing file with the same name will be erased #
1. Python Control Structure
2. define functions
. Python Control Structure 1.1 ifprint ("############# if statement ###############"); X = int (input ("enter an integer:"); If x Print ("NONE "); 1.2 For ########################## for
ArticleDirectory
4. variables:
5. Name of the identifier:
6. Data Type:
7. objects:
8. logical and physical rows:
9. indent:
4. variables:
It is not enough to only use constants. We need a method that can store
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