update README.md

更新数据容器类数据
This commit is contained in:
2025-05-29 13:53:20 +08:00
committed by jycdt
parent cbcb7284d7
commit f1909cd28f
5 changed files with 42 additions and 3 deletions

7
.gitignore vendored
View File

@@ -7,4 +7,9 @@ media/*.mp4
# 忽略特定名称的 MP4 文件 # 忽略特定名称的 MP4 文件
video.mp4 video.mp4
movie.mp4 movie.mp4
# 忽略py虚拟环境
.venv/*
.venv/
.venv
.venv/Script

View File

@@ -1476,6 +1476,7 @@ Python中的5种数据容器
- 无序 - 无序
- 不能重复 - 不能重复
- 没有索引下标 - 没有索引下标
- 可修改
4. 字典dict键值对形式存储数据 4. 字典dict键值对形式存储数据
5. 字符串str字符序列 5. 字符串str字符序列

View File

@@ -1,3 +1,3 @@
# 2505PY # Python 代码库
python 一学期的代码内容和笔记,不包括视频

4
test.py Normal file
View File

@@ -0,0 +1,4 @@
#创建元组tp
tp = (1,2,3,4,5)
# 创建集合st
st = {1,2,3,4,5}

29
加强.md Normal file
View File

@@ -0,0 +1,29 @@
## 数据容器类型
创建符号:
- 列表:[1, 2, 3, 4, 5]
- 元组:(1, 2, 3, 4, 5)
- 集合:{1, 2, 3, 4, 5}
- 字典:{'key': 'value'}
### 列表list
使用[]包括,有序,可重复,下标读写
### 元组tuple
使用()包括,有序,可重复,下标可读取,不可修改
### 集合set
使用{}包括,无序,不可重复,无下标,可通过迭代读取
### 字典dict
使用{}包括,键值对[key:vlues],通过键读取
### 字符串str
在python中''或""都可以定义字符串,但建议''定义字符,""定义字符串