Based on my learning experience, I have summarized the following ten points to share with you:
1) The first step to learn python is to download a Python version from www.python.org. I recommend that you do not download an integrated development
In python, a naming system is used to identify the approximate access range.
Class myobjec (object ):
Username = "developerworks" # public
_ Email = "developerworks #163 #. com" # protected
_ Tel = "1391119 ****" # private
From this section
Chapter 1 Introduction
The scripting language is similar to DOS batch processing and UNIX shell programs. The script language does not need to be compiled and then executed every time, and can easily access the running program during execution, or
A good integrated development environment can greatly improve programming efficiency. Therefore, I need to first find a good python development tool.
Eclipse + pyDev, I feel pretty good. I will record the key points of the installation process in
The following is the result of a practical project.
Copy codeThe Code is as follows: # coding: UTF-8
Import Image, ImageDraw, ImageFont, OS, string, random, ImageFilter
Def initChars ():
"""
Allowed Character Set combination. The initial set is
Although Python has advantages that other languages cannot match in Function Programming, we should not forget that Python is also an OO language. Therefore, while focusing on the advantages of Python in FP, we also need to understand Python's OO
It is very painful to use Golang to write a photo, but it is still written. You are welcome to add a variety of language versions, especially those written by haskell.
Golang version
"Fmt" = "dongsheng": "15123102668" "hymenz": "11011011210" =
The following is the implementation of my functions. I wrote a detailed comment in the Code. The details are as follows:
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32, >>> ================================ RESTART ======
Recently, I am working on a platform for question management. I want to use the django upload module to upload some questions. I have encountered some problems and record them.
Take the demo for testing as an example:
First, because django's default
In computer programming,Callback Function, Or abbreviationCallback(Callback) refers to the reference of a piece of executable code that is passed to other code through function parameters. This design allows underlying code calls to subprograms
The module provides us with many methods to obtain information about the operating system, such as import platform. platform () # obtain the operating system name and version number, 'windows-7-6.1.7601-SP1 'platform. version () # obtain the OS
Assign a unique ID to a role when creating it.
Each item requires a unique ID when creating an item.
A unique ID is required when you create a baby or animal
Principles
The principle of the ID generator is to use a global integer variable. After
In python,The module supports image formats.
This module mainly processes the formats of recognized images.
The functions provided by the module are as follows:
imghdr.what(filename, h= Tests the image data contained the file named by
In Python, a naming system is used to identify the approximate access range.Class MyObjec (object ):Username = "developerworks" # public_ Email = "developerworks #163 #. com" # protected_ Tel = "1391119 ****" # privateThe code shows some clever
For example, convert a string into a character array:TheList = list (theString)At the same time, we can easily traverse through the for statement:For c in theString:Do_something_with (c)Even more, use the following statement:Result =
Copy codeThe Code is as follows:MulLine = "" Hello !!!Wellcome to Python's world!There are a lot of interesting things!Enjoy yourself. Thank you! """Print ''. join (mulLine. splitlines ())Print '------------'Print ''. join (mulLine. splitlines (True
1. Open a webpage to retrieve all the content
From
Urllib
Import
Urlopen
Doc
=
Urlopen
(
Http://www.baidu.com"
)
.
Read
()
Print
Doc
2. Get the Http Header
From
Urllib
Import
Urlopen
Doc
=
Urlopen
(
Http://www.baidu.com"
)
Print
Doc
.
Static local name DetectionWhen Python detects local scopes: It detects code compilation in python, rather than assigning values at runtime.Under normal circumstances, the name that is not copied in the function will be searched in the module
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