1、Python概述

作者: 代码充电宝 | 来源:发表于2019-04-25 20:14 被阅读21次

    (1)Python概述

    • Python适合的领域
      Web网站和各种网络服务
      系统工具和脚本
      作为胶水语言把其他语言开发的模块包装起来方便使用
    • Python不适合的领域
      不适合贴近硬件的代码(首选C)
      移动开发:IOS/Android有各自的开发语言(Objective-C,Swift/Java)
      游戏开发:C/C++
    • Python跨平台语言,可以在Windows、Mac、Linux系统上运行
    • Python与其他语言的对比
    项目 类型 运行速度 代码量
    C 编译为机器码 非常快 非常多
    Java 编译为字节码
    Python 解释执行

    (2)下载安装

    • 安装步骤如下:
    1. 下载官网https://www.python.org/,msi直接安装(Python的2.x和3.x版本不兼容,注意版本)
    2. 配置Python环境变量path(python安装的根目录D:\ITSoft\Python)
    3. cmd命令行 输入python命令
    C:\Users\wangc>python
    Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 100+200
    300
    >>> print 'hello world'
    hello world
    >>> exit()
    C:\Users\wangc>
    
    • 编写一个文件hello.py文件
    print 'hello world'
    
    • 定位到hello.py打开cmd,python会自动执行文件中的python代码
    C:\Users\wangc>cd C:\Users\wangc\Documents\python
    C:\Users\wangc\Documents\python>python hello.py
    hello world
    C:\Users\wangc\Documents\python>
    

    (3)PythonCharm安装配置

    (4)Python相关网站

    相关文章

      网友评论

        本文标题:1、Python概述

        本文链接:https://www.haomeiwen.com/subject/olrtnqtx.html