Introduction to Python 3
Python is designed for readability. Unlike other languages, which often use English keywords and some punctuation, it has a more distinctive syntax than other languages.
- Python is an interpreted language: This means there’s no compilation step during development, similar to PHP and Perl.
-
Python is an interactive language: This means you can execute code directly from a Python prompt: >>>
-
Python is an object-oriented language: This means Python supports an object-oriented style of programming, or the technique of encapsulating code within objects.
-
Python is a beginner’s language: Python is a great language for beginning programmers, supporting a wide range of application development, from simple word processing to WWW browsers to games.
History of Python
Python was designed by Guido van Rossum in the late 1980s and early 1990s at the National Institute for Mathematics and Computer Science in the Netherlands.
Python itself is derived from many other languages, including ABC, Modula-3, C, C++, Algol-68, SmallTalk, the Unix shell, and other scripting languages.
Like the Perl language, Python’s source code is licensed under the GNU General Public License (GPL).
Python is now 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, adding full garbage collection and Unicode support.
Python 3.0 was released on December 3, 2008. This version is not fully compatible with previous Python source code. However, many new features were later backported to the older Python 2.6/2.7 versions.
Python 3.0, often referred to as Python 3000 or simply Py3k, is a major upgrade compared to earlier Python versions.
Python 2.7 is designated the last Python 2.x version. In addition to supporting Python 2.x syntax, it also supports some Python 3.1 syntax.
Python Features
-
1. Easy to Learn: Python has relatively few keywords, a simple structure, and a well-defined syntax, making it easier to learn.
-
2. Easy to Read: Python code is more clearly defined.
-
3. Ease of Maintenance: Python’s success lies in its remarkably easy-to-maintain source code.
-
4. An Extensive Standard Library: One of Python’s greatest strengths is its rich library and cross-platform compatibility across UNIX, Windows, and Macintosh.
-
5. Interactive Mode: Interactive mode supports the language, allowing you to enter code from the terminal and get results, interactively testing and debugging code snippets.
-
6. Portability: Due to its open source nature, Python has been ported (i.e., made to work) to many platforms.
-
7. Extensibility: If you need a critical piece of code that runs quickly, or want to write an algorithm that you don’t want to make public, you can write that part of the program in C or C++ and then call it from your Python program.
-
8. Databases: Python provides interfaces to all major commercial databases.
-
9. GUI Programming: Python supports the creation of GUIs and porting to many system calls.
-
10. Embeddability: You can embed Python into C/C++ programs, giving your program’s users “scripting” capabilities.
Python Applications
- Youtube – Video social networking site
- Reddit – Social sharing site
- Dropbox – File sharing service
- Douban – A database of cultural products such as books, records, and movies
- Zhihu – A question-and-answer site
- Guokr – A general technology website
- Bottle – A Python micro-web framework
- EVE – The online game EVE is heavily developed using Python
- Blender – An open-source 3D drawing software that uses Python as a modeling tool and GUI language
- Inkscape – An open-source SVG vector graphics editor.
- …