File tree Expand file tree Collapse file tree 4 files changed +53
-449
lines changed Expand file tree Collapse file tree 4 files changed +53
-449
lines changed Original file line number Diff line number Diff line change 1- #!/usr/bin/env python
1+ #!/usr/local/ bin/python3
22#-*- coding:utf-8 -*-
3- # Author: liuchuan
4- # File: 01_String.py
5- # Datetime: 2019-06-28 15:59
6- # Software: Visual Studio Code
3+ # Author: DevLiuSir
4+ # Contact: liuchuan910927@hotmail.com
5+ # File: 01_basicSyntax.py
6+ # Datetime: 2019/4/15 00:01
7+ # Software: PyCharm
78
89
910#注释
7576
7677print ('------------------------------' )
7778
78- print ('hello\n runoob ' ) # 使用反斜杠(\)+n转义特殊字符
79- print (r'hello\nrunoob ' ) # 在字符串前面添加一个 r,表示原始字符串,不会发生转义
79+ print ('hello\n DevLiuSir ' ) # 使用反斜杠(\)+n转义特殊字符
80+ print (r'hello\nDevLiuSir ' ) # 在字符串前面添加一个 r,表示原始字符串,不会发生转义
8081
8182
8283# 导入 sys 模块
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+ #-*- coding:utf-8 -*-
3+ # Author: liuchuan
4+ # Contact: liuchuan910927@gmail.com
5+ # File: 01_lc_basic_data_type.py
6+ # Datetime: 2018/11/16 21:35
7+ # Software: PyCharm
8+
9+
10+ # -------------- Python3 基本数据类型 -----------
11+
12+ '''
13+ Python 中的变量不需要声明。每个变量在使用前都必须赋值,变量赋值以后该变量才会被创建。
14+ 在 Python 中,变量就是变量,它没有类型,我们所说的"类型"是变量所指的内存中对象的类型。
15+ 等号(=)用来给变量赋值。
16+ '''
17+
18+ # 等号(=)运算符左边是一个变量名,等号(=)运算符右边是存储在变量中的值。例如:
19+ counter = 100 # 整型变量
20+ miles = 1000.0 # 浮点型变量
21+ name = "Python" # 字符串
22+
23+ print (counter )
24+ print (miles )
25+ print (name )
26+
27+
28+ # ------------- 标准数据类型 -------------------
29+
30+ '''
31+ Python3 中有六个标准的数据类型:
32+
33+ Number(数字)
34+ String(字符串)
35+ List(列表)
36+ Tuple(元组)
37+ Set(集合)
38+ Dictionary(字典)
39+ Python3 的六个标准数据类型中:
40+
41+ 不可变数据(3 个): Number(数字)、String(字符串)、Tuple(元组);
42+ 可变数据(3 个): List(列表)、Dictionary(字典)、Set(集合).
43+
44+ '''
45+
You can’t perform that action at this time.
0 commit comments