[Learn Python with me] python learning abstract and python learning Abstract

Source: Internet
Author: User

[Learn Python with me] python learning abstract and python learning Abstract

 

Beginning with Jing, he pushed an article: The office etiquette that codenong should pay attention to at ordinary times

It is necessary to learn a scripting language. When we develop some simple and fast programs, the scripting language will be useful and powerful.
According to the introduction of python, python is a very simple and powerful language. In addition, it is object-oriented. Pthon can be expanded through c.
Python tutorial
Http://linux.chinaitlab.com/manual/Python_chinese/index.html

1. Python has only four types of numbers: integer, long integer, floating point, and plural.
2. String
Single quotation marks and double quotation marks share the same role and indicate a string.
Three quotation marks (''' or "") indicate a multi-line string
3. variable naming rule characters, underlines and numbers, but cannot begin with a number and are case sensitive.
4. A semicolon indicates the end of a logical line/statement. This is the same as java, but the best practice is that a physical row should preferably be a logical row with as few semicolons as possible. If you want to represent a logical row in multiple physical rows, use \ to separate
5. Blank space is important in Python. In fact, the blank at the beginning of the line is important. It is called indentation. The blank spaces (spaces and tabs) at the beginning of the logical line are used to determine the indentation level of the logical line and determine the grouping of statements. This means that the statements at the same level must have the same indentation. Each group of such statements is called a block.

 

(Note: In python, the code needs to be written from the first column without spaces. In this way, it is the main statement block. When the layers need to be separated, use a colon: that is, the next line of the colon starts as another statement block. The first line of the same statement block must have the same space. Similar to the function of curly braces in java)
6. python Functions

 

Definition: keyword def function name ():

 

For example

 

def  sayHello (): 
    print  'Hello World!'  # block belonging to the function

 

Function usage is similar to that of java, but there are also differences. For example, the default value of the parameter must be placed at the end, and sayHello (x, y = 4 ). if there are many parameters, we can use "Key Parameters" to assign values to the parameters. It means that values can be assigned based on the parameter name. For example, sayHello (a, B, c) can be used to call sayHello (c = 4, B = 2, a = 10)

 

 

 

Recommended python3 tutorial

 

Http://woodpecker.org.cn/diveintopython3/index.html

 


[Learn python] Which version is downloaded? How to Learn python?

1. Use python2.5. 2.6 and 2.7 are actually the transitional products from python2.x to python3.x for the promotion of 3.x. some syntaxes are also compatible with the following syntaxes. Currently, most of the Code is 2.5, So 2.5 is recommended.

2. The installation is very simple and there is nothing to pay attention to. It is best to set the path at the end.

3. directly go to the corresponding version of the document on the official python website. If you want to get started quickly, there is a book called "conquer python", which is not very well written. The introduction is wide but incomplete, and the entry is still good. You can just look at it and it is not worth buying.

PS:
Not required. Simply use a text editor (such as Notepad, UE, and emacs) to compile the file. After writing the file, simply change the suffix to. py.
In addition, you are talking about the GUI provided by python. Just like the command window of matlab, You can input and execute them one by one.

After reading the python learning manual, How can I improve my python programming skills?

1) Python is a very easy-to-use language, so you must be able to learn it carefully.
2) If you want to improve any language, you can only continue to practice, practice, and practice. Practice makes perfect.
3) at the beginning, you can find a book with examples and follow the examples in the book to practice and understand. After getting familiar with such a language to a certain extent, you can consider how to use it to work, for example, which jobs can be made simple using python. From simple to complex, step by step.
Learning programming is the same as practicing martial arts in novels. algorithms are just a matter of practice. How can I keep improving my skills when I read the cheats all day without practicing them? To a certain extent, K people can be trained and improved in practice. This process should be good at thinking and summarizing (understanding ). I'm afraid I can't beat it, but I'm sure I can only beat Luo (how can I upgrade my experience without playing the blame ?). You can become a master only when you take the shot. Good luck!

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.