Life is short, I use python--Day1

Source: Internet
Author: User
Tags what parameter

Getting Started supplements

Introduction to the language of Python:

Python's author was developed by Guido van Rossum, Guido developed Python using the ABC language, the ABC language is a language used primarily for teaching, Guido in the development of Python in the use of the need to learn the availability of ABC, So later, including Guido, the predecessor of Python was considered to be the ABC language. Why call the Python language instead of the Alex language? It was because Gudio was particularly fond of a local TV series ' Month Python's Flying circus ' so the Python language was born. Its first version of the implementation is on the MAC computer, has been in the 90 's, the openness of PYTHON, the simplicity of the syntax is greatly liked by many programmers, many people take it to quickly develop some scripts and tools, and constantly to the official new code and third-party modules, so Python There are more things to do, and some big companies like YAHOO and EBAY are starting to use PYTHON in their production environments. By October 16, 2000, PYTHON2.0 released a complete garbage collection compared to the previous version of 1.x, and supported UNICODE, while the entire development process was more transparent and the community's impact on the development of PYTHON was growing.

The history of Python:

Released from the first 2.0 release of 2000, we have had a part-time experience in the process of 3.5, as follows:

  • 1989, in order to pass the Christmas holiday, Guido began to write the Python language compiler. The name Python, from Guido's beloved TV show Monty Python's Flying Circus. He hoped that the new language, called Python, would fit his ideals: create a language that is all-powerful, easy to learn, easy to use, and extensible, between C and Shell.
  • 1991, the first Python compiler was born. It is implemented in C language and can call the C language library file. From birth, Python already has: classes, functions, exception handling, core data types including tables and dictionaries, and module-based expansion systems.
  • granddaddy of Python web frameworks, Zope 1 is released in 1999
  • Python 1.0-january 1994 added &NB Sp;lambda, map, filter and reduce.
  • python 2.0-october 16, 2000, adds a memory-recycling mechanism that forms the basis of the Python language framework now
  • Python 2.4-november 30, 2004, the same year the most popular web framework Django is born
  • Python 2.5-september, 2006
  • Python 2.6-october 1,
  • Python 3.0-december 3,
  • Python 3.1-june,
  • Python 2.7-july 3, 2010
  • In 2008 of October and December the same year Python officially released two versions, For python2.6 and python3.0, individuals who have been too eager to be a Python official, the release of version 3.0 is not fully compatible with the previous version of 2.6 or earlier, resulting in a 3.0 release that is very slow, so it's 2010 years of 2.7, and this version is also called an over-version.                                                       The most popular version of the present is also the 2.7. We've looked for this in Python's official web, "in November, it's announced that Python 2.7 would is supported until 2020, and reaffirmed that There would is no 2.8 release as users were expected to move to Python 3.4+ as soon as possible "probably meant in November 2014, the Python website declared Cloth python2.7 will be supported until 2020, and no more python2.8 versions will be available, so users can upgrade Python to 2.4+ version as soon as possible.
  • Python 3.2-february 20, 2011
  • Python 3.3-september 29, 2012
  • Python 3.4-march 16, 2014
  • Python 3.5-september 13, 2015
  • What's the difference between Python3 and Python2? The small part of this simple elaboration under the eyes know a few differences, but most of the outstanding features will be continued, some bad use method will be discarded, as follows:
  • Print ' Hello world! ' Hello world!# Printing a string in Python2 is this format
    Print ('Hello world! ' Hello world!# Printing a string in Python3 is this format
  • >>> Name = input ('Please input your name:') Please input your name:seantraceback (most recent): File"<stdin>", Line 1,inch<module>File"<string>", Line 1,inch<module>Nameerror:name'Sean'  is  notdefined>>> Sean ='Sean'>>> Name = input ('Please input your name:') Please input your Name:sean>>>PrintNamesean>>> Name = input ('Please input your name:') Please input your name:'Xinsir'>>>PrintNamexinsir#in the Python2 input this function, the user defaults to enter what format parameter, python as is what parameter input, so since simply the trouble to die, of course python2 get the screen parameter
    There is also a function called raw_input (), where this function is more than a description, very similar to the input () function in Python3, continue to see
    >>> name = input ('pleaseinput your Name:') "pleaseinput your Name:sean  Print  (type (Name))<class'str'>#  The input () function in Python3 can be said to be equivalent to the raw_input () function in Python2, so the Python2 () function in Raw_input is integrated in Python3 and the input () function is a function input () function 

    Some libraries have been renamed

  • Old Name

    New Name

    _winreg

    WinReg

    Configparser

    Configparser

    Copy_reg

    Copyreg

    Queue

    Queue

    Socketserver

    Socketserver

    Markupbase

    _markupbase

    Repr

    Reprlib

    Test.test_support

    Test.support

Installation of Python:

Win under the super simple installation, just go to the official website to download EXE installation files, and then double-click the installation is good, as follows:

As: https://www.python.org/downloads/windows/download the appropriate version, install it, not here to explain how to install.

  

Linux under the installation of Python, the same only need to install to the Python official website to download the source package installation (of course, Linux system by default is a Python environment, if your own environment is not available in your production environment can be reinstalled the corresponding version), I recommend installing the UBUNT16.04LS desktop version, which defaults to the python2.7 and python3.5 two versions of the environment. I'm going to say a little bit about Linux. If there are two versions of Python, how to use the Python version correctly:

Life is short, I use python--Day1

Related Article

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.