python day01

1.设置pycharm的默认新建的内容,python3中不用写UTF-8,python默认支持中文

2.变量:存数和调用

变量名只能用字母、数字或下划线的任意组合 son_of_twins_brother_age或NameOfTwinsGF
变量的第一个字符不能是数字,只有下划线可以在第一位
以下关键字不能声明:关键字

单,双,三引号引起来的全是字符串。

 3.输入:

python2:
name = raw_input("what is your name?")
python3:
name = input("what is your name?")

raw_input("what is your name?")默认情况下全是字符
age = int(input("input your age:"))
%f:浮点数 %s:字符 %d:数字

 4.简单的了解模块

import os 

os.system("df -h")
os.mkdir("paobingge")
原文地址:https://www.cnblogs.com/tian880820/p/6141666.html