Home  >  Article  >  Backend Development  >  Why python is a scripting language

Why python is a scripting language

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-06-21 15:09:315674browse

The naming of python originates from a script screenplay, which causes the dialog box to be repeated verbatim every time it is run. Written by the famous "Turtle Uncle" Guido van Rossum during the Christmas period of 1989.

Python provides us with a very complete basic code library, covering a large number of contents such as networks, files, GUIs, databases, texts, etc. It is vividly called a "built-in battery".
In addition to the built-in libraries, Python also has a large number of third-party libraries, that is, Dingxi developed by others for your use. Of course, if the code you develop is well encapsulated, it can also be used as a third-party library for others to use.

Why python is a scripting language

Python is an interpreted language. When the code is executed, it will be translated line by line into machine code that the CPU can understand.
Advantages: Elegant, clear, efficient, simple
Disadvantages: slow running speed , code cannot be encrypted

Python is cross-platform, that is, interoperability.
It can run on Windows, Mac and various Linux/Unix systems. For example: if you write a Python program on Windows, it can also run on Linux.

Python is an object-oriented language, and everything in Python is an object.

Related recommendations: "Python Video Tutorial"

Scripting Language
Definition: In order to shorten the traditional processes.

Script language, also known as extended language, or dynamic language, is a programming language used to control software applications. Usually saved as text and only interpreted or compiled when called.

Features: The syntax is simple, generally saved in text form, and does not need to be compiled into a target program, and is directly interpreted when calling.

Common scripting languages ​​include: cmd command, JavaScript, VBScript, perl, PHP, Pyhton, Ruby

Extension
The heart of the computer, the CPU only recognizes machine commands
So, although different programming languages ​​are very different, they all have to be "translated" into machine commands that the CPU can execute.
Different programming languages, for the same event, the amount of code is also very different. For example:

To complete the same task, C language requires 1,000 lines of code, JAVA may only need 100 lines, and Python only needs 20 lines .
However, the price of less code is slow running speed. C language takes 1 second, JAVA may take 2 seconds, and Python may take 10 seconds.

The above is the detailed content of Why python is a scripting language. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn