Concise python3 tutorial 3. Introduction

Source: Internet
Author: User
Introduction

Python is one of the fewPowerfulAgainSimpleProgramming language. You will be pleasantly surprised to find that you can easily focus on solving problems rather than using your language format and structure by using python.

The following is an official introduction to Python:

Python is an easy to learn, powerful programming language. it has efficient high-level data structures and a simple but valid tive approach to object-oriented programming. python's elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and Rapid Application Development in advance areas on most platforms.

I will introduce these features in subsequent chapters.

Note
Python founder Guido van rosum named the language for the BBC program "Monty Python's flying circus. He is a snake who does not like to wrap his body and kill his prey.
Python features
Simple
Python is a simple and simple programming language. Reading high-quality Python programs will be the same as reading very rigorous English articles. The pseudocode of python is one of its biggest advantages. This allows you to focus only on the problem to be resolved, rather than the language itself.
Easy to learn
As mentioned above, the python format is very simple. This makes it easy to learn python.
Free and Open Source
Python is a free and open source software. In short, you can freely distribute copies, reads, changes, and reuse of the software's source code. Free and open source software is based on the Community concept of sharing knowledge. Python is created and maintained by communities that wish to make Python better. This is one of the reasons why python is so good.
Advanced Language
When writing a program using python, you will not be troubled by low-level problems such as program memory usage.
Portability
Python has been transplanted to many platforms with its open-source features. If all your python programs do not use any system dependency feature, they will run on any platform without modification.
You can use Linux, windows, FreeBSD, Macintosh, Solaris, OS/2, amiga, AROs, AS/400, BEOs, OS/390, Z/OS, Palm OS, QNX, run Python programs on VMS, Psion, Acorn risc OS, VxWorks, PlayStation, sharp zaurus, Windows CE, and even pocketpc.
Interpreted type
This requires some explanation.
The source code written in C, C ++, and other compiled languages must be converted to a computer-speaking language by a number of compilation options attached to the compiler: binary files. When these binary files are run, the operating system loads them into the memory and then runs them.
However, Python programs do not need to be compiled into binary files. You can directly "run" its source code. Python converts the source code to an intermediate form of bytecode, and then translates the bytecode into your computer's mother tongue and runs it. These processes make Python easier to use without worrying about compiling programs and loading dependent libraries. Similarly, this makes Python more portable: You can copy your python program to another computer and run it.
Object-oriented
Python not only supports process-oriented programming, but also object-oriented programming. Process-oriented languageContains only reusable program fragments such as procedures and functions. Object-oriented languageThe program consists of objects that combine data and functions. Python has a relatively large C ++ or Java simple but powerful object-oriented programming method.
Scalability
If you pursue the efficiency of key code execution or do not want some algorithms to be seen, you can write this part of the program in C or C ++ and use them in Python ..
Embedding
You can embed python into your C/C ++ program to provide script language support for your program.
Extended Library
The Python standard library is large. It helps you perform regular expressions, generate documents, unit tests, thread processing, databases, web browsers, CGI, FTP, e-mails, XML, XML-RPC, HTML, and WAV Files., encryption, Gui, TK, and other system dependencies. Remember that these features can be used in Python installation. This is Python's "built-in battery" philosophy.
There are also many high-quality libraries based on standard libraries, such as wxpython, twisted, and Python imaging library.

Python is a powerful and exciting language. It combines performance and features and makes it interesting and easy to use Python programming,

Why not use Perl?

If you don't know, Perl is another popular open-source scripting language.

If you have tried to write large programs using Perl, you may have found the answer. Based on Yahoo! With the experience of writing large Perl programs, small Perl programs are easy to write and can complete tasks well. After the program grows, Perl programs become very clumsy.

Compared with Perl, the python program is simpler, clearer, and easier to write, so it is more readable and maintainability. I really appreciate Perl and use it to process everyday things, but whenever I start programming, Python naturally comes to my mind. Perl has undergone too many changes and processes. Unfortunately, the upcoming Perl 6 has not considered improvements.

I think the only advantage of Perl is its Perl comprehensive archive network, CPAN library. As its name suggests, the CPAN library is a huge collection of Perl modules. Its size and depth are unimaginable-you can make your computer rely on these modules to do almost everything. Perl has a long history than python, which is one of the reasons why it has more modules than python. However, the development of the python package directory seems to be able to change this situation.

Why not Ruby?

If you don't know, Ruby is another popular open-source scripting language.

If you are in love with Ruby, I suggest you continue using Ruby.

If you haven't used Ruby or haven't decided to use Ruby or Python, I suggest you use python from an easy-to-learn point of view. I personally think it is difficult to master the ruby language. For those who master Ruby, they are praising Ruby's beauty. Unfortunately, I am not so lucky to learn Ruby.

What programmers say

Maybe you will be interested in the review of python by great hackers like ESR:

  • Eric RaymondIs the author of Cathedral and market and the author of the word open source. He said that python has become his favorite programming language. This article encouraged me to get started with python for the first time.
  • Bruce EckelHe is the author of thinking in Java and thinking in C ++. He believes that python is the only programming language designed to simplify the work of programmers. For more information, please read the complete interview.
  • Peter norvig is the author of the famous lisp book and the Google search Quality Director (thanks to Guido van rosum for pointing out ). He believes that python has become an indispensable part of Google. You can view Google jobs to determine this conclusion: Understanding Python has become a requirement for Google software engineers.
For Python 3.0

Python 3.0 is a new version of the Python language. It is also called Python 3000 or py3k.

This version solves many small issues that have been accumulated for a long time and makes Python more concise.

If you have a lot of Python 2.x source code, the tool here can help you convert the 2.x source code to the 3.x source code.

For more details, see:

  • Introduction to Guido van rosum
  • What's new in Python 2.6 (which has very different features from the previous Python 2.x version and is likely to be included in Python 3.0 .)
  • What's new in Python 3.0?
  • Python 2.6 and 3.0 release schedule
  • Python 3000 (the official authoritative list of proposed changes)
  • Miscellaneous Python 3.0 plans
  • Python News (detailed list of changes)

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.