Python Learning Notes (i) Introduction overview

Source: Internet
Author: User

Class 1

First, Introduction

Python: scripting language, interpreted language

Indentation is a very important sign of the Python language.

Python3 is the future development trend

Second, installation

Windows:

1. Download the installation package:

https://www.python.org/downloads/

    2、安装:

    默认安装路径:C:\python2.7

    3、配置环境变量

    【右键计算机】--》【属性】--》【高级系统设置】--》【高级】--》【环境变量】--》【在第二个内容框中找到 变量名为Path 的一行,双击】 --> 【Python安装目录追加到变值值中,用 ; 分割】

    如:原来的值;C:\python27,切记前面有分号

linux & mac

    系统默认已经安装

Third, the first procedure

  print("hello world")

    指定解释器:如果想要类似于执行shell脚本一样执行python脚本,例: ./hello.py ,那么就需要在 hello.py 文件的头部指定解释器,如:

    #!/usr/bin/env python

  执行前需给予 hello.py 执行权限,chmod 755 hello.py

Iv. Variables & Character encodings

Variable name definition rules:

  1、Variable names can only be any combination of letters, numbers, or underscores

2. The first character of a variable name cannot be a number

3. Variable name cannot be a keyword

4, the variable name can not contain spaces and special characters (_ except)

Code:-*-coding:utf-8-*-

Five, module

Python has a rich and powerful library of standards and third-party libraries, which can be implemented in a non-language comparable capacity.

There is an unknown table here, and then record it after learning.

Python Learning Notes (i) Introduction overview

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.