Python是一种混合开发的电子计算机编程设计语言 。于1989年开发设计的语言,创办人范罗苏姆(Guido van Rossum),又称:龟叔(Guido)。

01 Python介绍

Python是一种混合开发的电子计算机编程设计语言。于1989年开发设计的语言,创办人范罗苏姆(Guido van Rossum),又称:龟叔(Guido) 。

python具备十分多而且强劲的第三方库,促使软件开发起來游刃有余 。

Python“使命”:人生短暂,我就用python!(Life is short,you need Python。)

02 Python 版本

  • python 2.x 版本,官方网在 2020 年终止适用,原码不标准,反复较多

  • python 3.x 版本 ,作用更为强劲且修补了许多bug,原码清楚,简易

Let's not play games with semantics. The way I see the situation for 2.7 is that EOL is January 1st, 2020, and there will be no updates, not even source-only security patches, after that date. Support (from the core devs, the PSF, and python.org) stops completely on that date. If you want support for 2.7 beyond that day you will have to pay a commercial vendor. Of course it's open source so people are also welcome to fork it. But the core devs have toiled long enough, and the 2020 EOL date (an extension from the originally annouced 2015 EOL!) was announced with sufficient lead time and fanfare that I don't feel bad about stopping to support it at all.【全文连接】

03 Python善于的行业

  • Web开发设计:Django 、pyramid、Tornado、Bottle 、Flask 、WebPy

  • 网络编程技术:Twisted、Requests、Scrapy 、Paramiko

  • 科学研究计算:SciPy、Pandas、lpython

  • GUI图型开发设计:wxPython 、PyQT、Kivy

  • 运维自动化:OpenStack、SaltStack 、Ansible、腾讯官方长须鲸

04 Python解释器(一部分):

  • (1)Cpython(官方网强烈推荐):把python转化成c语言能鉴别的二进制码

  • (2)Jpython:把python转化成java语言能鉴别的二进制码

  • (3)别的语言解释器:把python转化成别的语言能鉴别的二进制码

  • (4)PyPy:将全部编码一次性编写出二进制码,加速实行高效率(效仿编译程序型语言的一款python解释器)

05 2020年十月TIOBE指数值

06 Python自然环境的安裝

Windows

下载安装包:https://www.python.org/downloads/

配备系统变量:【鼠标右键电子计算机】-->【特性】-->【高級系统配置】-->【高級】-->【系统变量】-->【在系统变量中寻找 Path,双击鼠标或编写】-->【加上Python安装文件,如;C:\python38 ,谨记前边有英文标点符号分号(win10系统变量与win7大体一致)】

Linux、Mac

不用安裝 ,系统软件内置Python自然环境,可是可挑选升級版本。

07 撰写第一个Python程序流程

print("Hello World!")

08 编译程序型与表述型语言差别(填补)

  • 编译程序型:一次性把全部编码编写出设备能鉴别的二进制码再运行
    • 意味着语言:c,c
    • 优势:实行速度更快
    • 缺陷:开发设计速度比较慢 ,调节时间长
  • 表述型:编码从上向下一行一行表述并运作:
    • 意味着语言:python,php
    • 优势:开发设计高效率快,调节周期时间短
    • 缺陷:实行速率相对性慢

09 与其他程序编写语言的比照

C

#include <iostream> using namespace std; int main() { cout << "Hello World"; return 0; }

C

#include <stdio.h> int main() { /* 我的第一个 C 程序流程 */ printf("Hello, World! \n"); return 0; }

C#

using System; namespace HelloWorldApplication { class HelloWorld { static void Main(string[] args) { /* 我的第一个 C# 程序流程*/ Console.WriteLine("Hello World!"); Console.ReadKey(); } } }

Java

public class HelloWorld { public static void main(String []args) { System.out.println("Hello World!"); } }

PHP

<?php echo 'Hello World!'; ?>

Ruby

puts "Hello World!";

Go

package main import "fmt" func main() { fmt.Println("Hello, World!") }

Python

print("Hello, World!");

10 Python之禅(拓展)

import this

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

文章来源于网络 ,如有侵权请联系站长QQ61910465删除
本文版权归QU快排Www.seoGurubLog.com 所有,如有转发请注明来出,竞价开户托管,seo优化请联系QQ▲61910465