Introduction to Python3
Python is a high-level language that combines interpretability, compilability, interactivity, and object-orientation.
Python's design emphasizes readability, using English keywords frequently and featuring syntax structures that are more distinctive than those found in other languages.
-
Python is an interpreted language: This means that the development process does not include a compilation step, similar to languages like PHP and Perl.
-
Python is an interactive language: This means you can execute code directly after the Python prompt >>>
.
-
Python is an object-oriented language: This means Python supports programming styles that involve the encapsulation of code within objects.
-
Python is a language for beginners: Python is a great language for novice programmers, supporting a wide range of application development, from simple text processing to web browsers and games.
Python's History
Python was developed by Guido van Rossum in the late 1980s and early 1990s at the National Research Institute for Mathematics and Computer Science in the Netherlands.
Python evolved from several other languages, including ABC, Modula-3, C, C++, Algol-68, SmallTalk, Unix shell, and other scripting languages.
Like Perl, Python's source code is also available under the GPL (GNU General Public License).
Today, Python is maintained by a core development team, with Guido van Rossum still playing a crucial role in guiding its progress.
Python 2.0 was released on October 16, 2000, featuring full garbage collection and Unicode support.
Python 3.0 was released on December 3, 2008, and is not fully backward-compatible with previous Python source code. However, many new features were later ported to the older Python 2.6/2.7 versions.
Python 3.0, often referred to as Python 3000 or Py3k, was a significant upgrade from earlier versions of Python.
Python 2.7 was designated as the last Python 2.x release, supporting both Python 2.x syntax and some Python 3.1 syntax.
Python Features
-
1. Easy to learn: Python has relatively few keywords, simple structures, and a clearly defined syntax, making it easier to learn.
-
2. Easy to read: Python code is more clearly defined.
-
3. Easy to maintain: The success of Python is largely due to its highly maintainable source code.
-
4. A vast standard library: One of Python's greatest strengths is its rich library, which is cross-platform and works well on UNIX, Windows, and Macintosh.
-
5. Interactive mode: Python supports interactive mode, allowing you to execute code from the terminal and receive results, making it ideal for testing and debugging code snippets.
-
6. Portable: Due to its open-source nature, Python has been ported (made to work) on many platforms.
-
7. Extensible: If you need a critical piece of code to run quickly or want to keep certain algorithms proprietary, you can write that part in C or C++ and call it from your Python program.
-
8. Database: Python provides interfaces to all major commercial databases.
-
9. GUI programming: Python supports GUI creation and can be ported to many system calls.
-
10. Embeddable: You can embed Python into C/C++ programs to give your program's users scripting capabilities.
Python Applications
YouTube - Video social network
Reddit - Social sharing website
Dropbox - File sharing service
Douban - Database website for books, records, films, and other cultural products
Zhihu - A question-and-answer website
Guokr - A general-tech themed website
Bottle - Python micro web framework
EVE - Online game EVE uses Python extensively for development
Blender - Open-source 3D drawing software that uses Python as a modeling tool and GUI language
Inkscape - An open-source SVG vector graphics editor
...