python的基础知识点

一、python 指定解释器

Python xxx.py

#!/usr/bin/env python

二、

Python 编码

2.7版本要声明 #! -*-cording:utf-8 -*-

3.5版本默认utf8不用声明

三、

python中注意空格(其实就是类似java的{ })

下一行回车后,打tab空格;

if else while 条件语句后要加:

if else 条件语句下的执行语句要缩进4个空格;

while循环内,break直接跳出;continue 继续返回上一层执行循环

原文地址:https://www.cnblogs.com/aqiuarcadia/p/7281875.html