当前位置:首页>python>一文掌握Python数据容器

一文掌握Python数据容器

  • 2026-02-06 03:24:15
一文掌握Python数据容器

写在前面

数据容器时指一种可存储多个元素的Python数据类型,主要包含list(列表)、tuple(元组)、str(字符串)、set(集合)、dict(字典)。

一、列表

9.1.1 列表定义

定义新的列表:变量名称 = [元素1, 元素2, 元素3, 元素4, ....]

定义空列表:变量名称 = []变量名称 = list()

9.1.2 嵌套列表

列表中的元素比较灵活,可以均互不相同:

# 可以发现,下面列表的三个元素均不同bioinformatic = [2023'Biomamba',True]print(type(bioinformatic))# 这意味着列表里可以"套"列表,称为嵌套列表
## <class 'list'>
bioinformatic = [2023'Biomamba',True,[2023'subBiomamba',True]]print(type(bioinformatic))
## <class 'list'>

9.1.3 列表下标索引

列表中元素的索引有些反人类,第一个元素的索引编号为0,第二个索引编号为1,一次类推,可用list[索引编号的方式取出]

bioinformatic = [2023'Biomamba',True]print(bioinformatic[0])
## 2023
print(bioinformatic[1])
## Biomamba
print(bioinformatic[2])
## True

不仅可以正着数,列表索引还支持倒着数,最后一个元素的索引为-1,倒数第二个的索引为-2,依次类推:

bioinformatic = [2023'Biomamba',True]print(bioinformatic[-1])
## True
print(bioinformatic[-2])
## Biomamba
print(bioinformatic[-3])
## 2023

那么问题来了,嵌套的索引如何取出元素呢:

# 取出subBiomamba这个元素bioinformatic = [2023'Biomamba',True,[2023'subBiomamba',True]]print(bioinformatic[3][1])# 倒着取:
## subBiomamba
print(bioinformatic[-1][-2])
## subBiomamba

记得索引不要超出范围,否则会报错list index out of range9.1.4 list中的方法与操作 

list.index(元素) 该方法可以根据元素的内容找出元素在列表中对应的下标:

bioinformatic = [2023'Biomamba',True,[2023'subBiomamba',True]]bioinformatic.index('Biomamba')#返回了`Biomamba`字符所在的正向索引:
## 1
# 若查找的元素不存在,则会报错:bioinformatic.index('Bioinformatics')

ValueError: ‘Bioinformatics’ is not in list

修改已有元素值

bioinformatic[1="我是一个修改后的元素"print(bioinformatic)# 可以看到bioinformatic这个列表中索引1对应的元素已被替换:
## [2023, '我是一个修改后的元素', True, [2023, 'subBiomamba', True]]

插入新元素

bioinformatic.insert(1,'新插入的元素')print(bioinformatic)# 可以看到元素被插入索引1的位置,后面的元素被依次推后
## [2023, '新插入的元素', '我是一个修改后的元素', True, [2023, 'subBiomamba', True]]

追加元素

# 如果像R语言那样输入一个不存在的索引去追加,就会出现如下报错bioinformatic[6='我是一个追加的元素'

IndexError: list assignment index out of range

# 通过append方法可以做到我们设想的追加功能:bioinformatic.append('我是一个追加的元素')print(bioinformatic)# 只能写入尾部
## [2023, '新插入的元素', '我是一个修改后的元素', True, [2023, 'subBiomamba', True], '我是一个追加的元素']

追加多个元素

list.append的方式只能向尾部添加单个字面量,而list.extend可以直接把其它数据容器中的内容整个取出,依次追加到列表尾部:

new_list = [1,2,3]print(new_list)
## [1, 2, 3]
bioinformatic.extend(new_list)print(bioinformatic)
## [2023, '新插入的元素', '我是一个修改后的元素', True, [2023, 'subBiomamba', True], '我是一个追加的元素', 1, 2, 3]

元素删除

# 方式一# del 列表[下标]print(bioinformatic)
## [2023, '新插入的元素', '我是一个修改后的元素', True, [2023, 'subBiomamba', True], '我是一个追加的元素', 1, 2, 3]
del bioinformatic[-1]print(bioinformatic)
## [2023, '新插入的元素', '我是一个修改后的元素', True, [2023, 'subBiomamba', True], '我是一个追加的元素', 1, 2]
# 方式二# 列表.pop(下标)print(bioinformatic)
## [2023, '新插入的元素', '我是一个修改后的元素', True, [2023, 'subBiomamba', True], '我是一个追加的元素', 1, 2]
bioinformatic.pop(-1)
## 2
print(bioinformatic)
## [2023, '新插入的元素', '我是一个修改后的元素', True, [2023, 'subBiomamba', True], '我是一个追加的元素', 1]
# pop方法的实质是从列表中取出对应元素,因此,pop方法可以返回对应的值:print(bioinformatic)
## [2023, '新插入的元素', '我是一个修改后的元素', True, [2023, 'subBiomamba', True], '我是一个追加的元素', 1]
my_value = bioinformatic.pop(-1)print(my_value)
## 1
# 方式3 list.remove()new_list = ['num_1','num_2','num_3','num_1','num_4']new_list.remove('num_1')print(new_list)# 可以看出remove方法通过给定内容,在列表中正序检索,删除对应的元素
## ['num_2', 'num_3', 'num_1', 'num_4']

列表清空

print(new_list)
## ['num_2', 'num_3', 'num_1', 'num_4']
new_list.clear()print(new_list)
## []

统计某一内容在列表中的数量

new_list = ['Biomamba','bioinformatics','Biomamba','Biomamba']new_list.count('Biomamba')
## 3

统计列表中元素数量

len(new_list)
## 4

9.1.5 遍历列表

由于列表的索引结构,我们可以让列表的索引与循环发生一些交互:

while循环:

my_list = ['Biomamba_1','Biomamba_2','Biommaba_3']temp_num =0while temp_num <len(my_list):print(f"这是list中的第{temp_num+1}个元素,它的索引为:{temp_num},它的值为{my_list[temp_num]}")    temp_num +=1
## 这是list中的第1个元素,它的索引为:0,它的值为Biomamba_1## 这是list中的第2个元素,它的索引为:1,它的值为Biomamba_2## 这是list中的第3个元素,它的索引为:2,它的值为Biommaba_3

for循环

my_list = ['Biomamba_1','Biomamba_2','Biommaba_3']for temp_ele in my_list:print(f"这是list中的第{my_list.index(temp_ele)+1}个元素,它的索引值为:{my_list.index(temp_ele)+1},它的值为{temp_ele}")    temp_num +=1
## 这是list中的第1个元素,它的索引值为:1,它的值为Biomamba_1## 这是list中的第2个元素,它的索引值为:2,它的值为Biomamba_2## 这是list中的第3个元素,它的索引值为:3,它的值为Biommaba_3

二、元组

9.2.1 元组的定义格式

元组与列表一样,是可封装多个、不同类型的元素的数据容器。但元组一旦定义,便不可修改、不可修改、不可修改(重说三)。元组的定义方法主要有以下几种方式:

定义元组字面量

(元素,元素,元素,…,元素,)

('Biomamba',2023,'bioinformatic')
## ('Biomamba', 2023, 'bioinformatic')

定义元组变量

变量名 = (元素,元素,元素,…,元素,)

my_tuple = ('Biomamba',2023,'bioinformatic')print(my_tuple)
## ('Biomamba', 2023, 'bioinformatic')

定义空元组

变量名称 = ()变量名称 = tuple()

print(tuple())
## ()
print(type(tuple()))
## <class 'tuple'>

单元素元组

单元素的元组需要在元素后加上一个”,“,否则默认为字串类型

# 不加逗号print(type(('Biomamba')))# 加上一个逗号
## <class 'str'>
print(type(('Biomamba',)))
## <class 'tuple'>

9.2.2 元组元素索引

无需过多介绍,与列表的索引使用方法基本一致,甚至各类方法也一致:

my_tuple = ('Biomamba',2023,'Biomamba','bioinformatic')print(my_tuple[0])
## Biomamba
print(my_tuple[-1])
## bioinformatic
print(my_tuple.index('Biomamba'))
## 0
print(my_tuple.count('Biomamba'))
## 2

9.2.3 元组修改

# 简单元素的元组不可修改my_tuple = ('Biomamba',2023,'Biomamba','bioinformatic')my_tuple[0='我是一个修改后的数据'
---------------------------------------------------------------------------TypeError                                 Traceback (most recent call last)Cell In[292], line 31# 简单元素的元组不可修改2 my_tuple = ('Biomamba',2023,'Biomamba','bioinformatic')---->3 my_tuple[0='我是一个修改后的数据'TypeError:'tuple' object does not support item assignment
# 当元组里有列表内容时:my_tuple = ('Biomamba',2023,'Biomamba','bioinformatic',['subBiomamba',2023,'subBiomamba','subbioinformatic'])# 可以进行修改my_tuple[-1][1="我是一个修改后的数据"print(my_tuple[-1][1] )

三、字符串

字符串是字符的容器,一个字符串可以存放任意数量的字符(只要内存够大,字符串长度就可继续增加)9.3.1 字符串格式化

字符串格式化的内容我们在5.1.2中已经提前详细介绍过,此处不再重复

9.3.2 字符串索引

注意字符串的索引为对应字节的索引,而非”单词”的索引,例如:

my_chr ='I am Biomamba'print(my_chr[0])
## I
print(my_chr[2])
## a
print(my_chr[-1])
## a
print(f"注意,空格也占一个字节:这里有一个空格:{my_chr[1]}。")
## 注意,空格也占一个字节:这里有一个空格:。
# 各类方法也依旧可以使用:print(my_chr.index('a'))# 也支持多个字符的检索
## 2
print(my_chr.index('Biomamba'))# 返回的索引是多字符的起始索引
## 5

9.3.3 字符串替换

字符串有一个listtuple不具备的方法:.replace。顾名思义,这一方法可以做字符串的替换:

my_chr ='I am Biomamba'# 语法为.replace('被替换内容','替换后生成的内容')new_mychr = my_chr.replace('Biomamba','the autuor of this tutorial')print(my_chr)
## I am Biomamba
print(new_mychr)# 可以看出,原本的字符串并没有发生改变# 即.replace并不是修改原字符串,而是替换原字符串内容后输出了一个新的字符串
## I am the autuor of this tutorial

9.3.4 字符串分割

通过.split(分隔符)可以对字符串进行分割,分隔后的数据类型为list

# 例如这里我有三段话,我希望通过句号来分割。my_chr ='I am Biomamba. I am the autuor of this tutorial. Today is Friday'split_result = my_chr.split('.')print(split_result)
## ['I am Biomamba', ' I am the autuor of this tutorial', ' Today is Friday']
print(type(split_result))# 分割后的结果为返回的list
## <class 'list'>

9.3.5 字符串规整操作

用于去除字符串中的一些字符,语法:字符串.strip(字符)

# 不传入任何参数,既是去除字符串首尾空格以及换行符my_chr =' I am Biomamba 'print(my_chr)
##  I am Biomamba
print(my_chr.strip())# 空格本来就是隐藏的,不太能看出来# 大家可以通过下面的缩进体会:
## I am Biomamba
my_chr ='I am Biomamba'print(my_chr)
## I am Biomamba
print(my_chr.strip("Ia"))# 这里可能和大家预想的不一样,# .strip的逻辑是将输入字符拆分为单个字符,如果字符串的首尾存在,则删除
##  am Biomamb

9.3.6 统计字符串出现次数

my_chr ='I am Biomamba'print(my_chr.count('am'))# 这时输入字符作为一个整体用于字数统计
## 2

9.3.7 字符串个数(长度)统计

len('I am Biomamba')
## 13

9.3.8 字符串遍历

与此前其它数据容器的操作方法类似:

my_chr ='I am Biomamba'for temp_chr in my_chr:print(f"{temp_chr}是字符串的第{my_chr.index(temp_chr)}个字符")
## I是字符串的第0个字符##  是字符串的第1个字符## a是字符串的第2个字符## m是字符串的第3个字符##  是字符串的第1个字符## B是字符串的第5个字符## i是字符串的第6个字符## o是字符串的第7个字符## m是字符串的第3个字符## a是字符串的第2个字符## m是字符串的第3个字符## b是字符串的第11个字符## a是字符串的第2个字符

四、序列及序列切片

序列为内容连续、有序、可使用下标索引的一类数据容器。我们此前介绍的列表元组字符串均属于序列。序列切片:从一个序列中取出一个子序列,序列切片的操作并不会影响序列本身,而是得到一个新的序列。语法为:序列[起始下标:结束下标:步长]

若起始下标留空视为从头开始,若结束下标留空视作截取到结尾,步长为依次取元素的间隔,若步长省略则视为1。注意,取出的内容不包含结束下标本身

my_chr = ['num_1','num_2','num_3','num_4','num_5','num_6','num_7','num_8','num_9']print(my_chr[1:4]) # 省略步长# 这样用起来还是跟R语言非常类似的# 但是不包含索引4本身,即实际取的索引为1、2、3
## ['num_2', 'num_3', 'num_4']
# 来一个究极省略的,省略起始下标、结束下标、步长:print(my_chr[:])# 这时整个序列会被输出
## ['num_1', 'num_2', 'num_3', 'num_4', 'num_5', 'num_6', 'num_7', 'num_8', 'num_9']
# 省略起始步长为3切片print(my_chr[::3])
## ['num_1', 'num_4', 'num_7']
# 在1到6个索引中以步长为2进行切片print(my_chr[0:5:2])
## ['num_1', 'num_3', 'num_5']
# 反向切片也支持print(my_chr[-1:-6:-2])# 步长也需要为负数# 那么给出的结果顺序为原序列的倒序
## ['num_9', 'num_7', 'num_5']

五、集合

集合(set)是一个无序的不重复元素。而此前介绍的列表、元组均是有序且可出现重复元素的。由于集合的无序性,自然也就不支持通过下标索引进行访问。但集合支持修改。

9.5.1 定义集合

定义集合字面量{元素,元素,元素,...,元素}定义集合变量变量名称 = {元素,元素,元素,...,元素}定义空集合变量名称 = set()例如:

# 定义集合my_set = {'Biomamba',2023,'Biomamba'}print(my_set)# 可以看到重复的'Biomamba'字样被直接去除
## {'Biomamba', 2023}

9.5.2 集合修改

# 添加集合元素my_set = {'Biomamba',2023,'Biomamba'}my_set.add('Study Python'#没有返回值,直接修改原集合print(my_set)# 可以看到Study Python被添加
## {'Biomamba', 'Study Python', 2023}
# 删除集合元素my_set = {'Biomamba',2023,'Biomamba'}my_set.remove(2023)print(my_set)
## {'Biomamba'}

9.5.3 取出集合元素

由于集合没有下标索引,.pop也就没有任何参数,只能随机取出集合重的一个元素并给出返回值。

# 删除集合元素my_set = {'Biomamba',2023}my_set.pop()
## 'Biomamba'
print(my_set)
## {2023}

9.5.4 清空集合

与各类序列的清空方法类似

my_set = {'Biomamba',2023}my_set.clear()print(my_set)# 清空并不是删除,还会存在一个空集合:
## set()

9.5.5 集合取差集

# 返回的结果是在my_set1中包含,但在my_set2中不包含的元素my_set1 = {'Biomamba',2023,'Study Python'}my_set2 = {'Biomamba',2023,'Study R'}my_set3 = my_set1.difference(my_set2)print(my_set3)
## {'Study Python'}
# 但对原集合本身的值无任何影响print(my_set1)
## {'Biomamba', 'Study Python', 2023}
print(my_set2)
## {'Biomamba', 'Study R', 2023}
# 在集合1内,删除与集合2相同的元素my_set1 = {'Biomamba',2023,'Study Python'}my_set2 = {'Biomamba',2023,'Study R'}my_set1.difference_update(my_set2)print(my_set1)# 也就是把集合一直接变成上一步的差集,但集合2不会发生变化
## {'Study Python'}
print(my_set2)
## {'Biomamba', 'Study R', 2023}

9.5.6 集合合并

my_set1 = {'Set1','Biomamba',2023,'Study Python'}my_set2 = {'Set2','Biomamba',2023,'Study R'}my_set3 = my_set1.union(my_set2)print(my_set3)
## {'Biomamba', 'Set2', 2023, 'Set1', 'Study Python', 'Study R'}

9.5.7 统计集合元素数量

len(my_set3)
## 6

9.5.8 遍历集合

由于集合不存在下标索引,那么while循环的方式无法应用于集合,但for循环依旧可以使用

# 利用for循环遍历打印出集合内的元素my_set = {'Set1','Biomamba',2023,'Study Python'}for temp_set in my_set:print(temp_set)
## Set1## Biomamba## Study Python## 2023

六、字典

字典是Python中的可变容器模型,且可存储任意类型对象。有些类似于哈希,可以通过特定的键值(key)返回对应的内容(value)字典的keyvalue可以是任意数据类型,但key不可为字典类型。

9.6.1 字典定义

字典的每个键值key:value用冒号 : 分割,每个键值对之间用逗号 , 分割,整个字典包括在花括号 {} 中 ,格式如下所示:d = {key1 : value1, key2 : value2 }例如如下的字典:

mydict = {"name":"Biomamba","Date":2023,"major":"Bioinformatics"}print(mydict)
## {'name': 'Biomamba', 'Date': 2023, 'major': 'Bioinformatics'}

定义空字典:

mydict = {}print(mydict)
## {}
print(type(mydict))
## <class 'dict'>

或者用函数定义空字典:

mydict =dict()print(mydict)
## {}
print(type(mydict))
## <class 'dict'>

字典会自动去除重复的key所在键值对:

mydict = {"name":"Biomamba","name":"Bioinformatic-base","Date":2023}print(mydict) # 可以看出保留的是最后一个重复的key对应的值
## {'name': 'Bioinformatic-base', 'Date': 2023}

9.6.2 字典值的获取

字典也不支持下标索引,可以通过字典[key]获取对应的值,例如:

mydict = {"name":"Biomamba","Date":2023,"major":"Bioinformatics"}print(mydict["name"])
## Biomamba

9.6.3 字典嵌套

例如value可以是一个子字典:

mydict = {'information':{'language':'python','skill':'scRNA-Seq'},'Date':{'year':2023},'month':5,'Day':4}print(mydict)
## {'information': {'language': 'python', 'skill': 'scRNA-Seq'}, 'Date': {'year': 2023}, 'month': 5, 'Day': 4}
# 获取嵌套字典的内容,例如查询information里的language对应的值:print(mydict["information"]["language"])
## python

9.6.4 修改字典

新增元素

mydict = {"name":"Biomamba"}print(mydict)
## {'name': 'Biomamba'}
mydict["Date"=2023print(mydict) # 可以看出无需再赋值给原字典,也可以添加元素
## {'name': 'Biomamba', 'Date': 2023}

更新元素由于字典的key无法重复,因此对已存在的key执行类似于添加的操作,即可更新value

mydict = {"name":"Biomamba","Date":2023}print(mydict)
## {'name': 'Biomamba', 'Date': 2023}
mydict["Date"=2000print(mydict) # 可以看出无需再赋值给原字典,也可以添加元素
## {'name': 'Biomamba', 'Date': 2000}

删除同时取出元素

mydict = {"name":"Biomamba","Date":2023}print(mydict)
## {'name': 'Biomamba', 'Date': 2023}
newdict = mydict.pop('Date')print(mydict)
## {'name': 'Biomamba'}
print(newdict)
## 2023

清空字典

mydict = {"name":"Biomamba","Date":2023}print(mydict)
## {'name': 'Biomamba', 'Date': 2023}
mydict.clear()print(mydict)
## {}

获取字典中全部的key

mydict = {"name":"Biomamba","Date":2023}mykeys = mydict.keys()print(mykeys)
## dict_keys(['name', 'Date'])

获取字典的元素数量

mydict = {"name":"Biomamba","Date":2023}len(mydict)
## 2

9.6.5 遍历字典

通过获得的key遍历字典:

mydict = {"name":"Biomamba","Date":2023,"major":"Bioinformatics"}for mytemp in mydict.keys():print(f"键值{mytemp}对应的value为:{mydict[mytemp]}")
## 键值name对应的value为:Biomamba## 键值Date对应的value为:2023## 键值major对应的value为:Bioinformatics

直接用for循环遍历字典,获得的临时变量就是key值:

mydict = {"name":"Biomamba","Date":2023,"major":"Bioinformatics"}for mytemp in mydict:print(f"键值{mytemp}对应的value为:{mydict[mytemp]}")
## 键值name对应的value为:Biomamba## 键值Date对应的value为:2023## 键值major对应的value为:Bioinformatics

因为字典没有下标索引,因此无法直接用于while循环,若通过len来取key的值则有些低效且不优雅:

mydict = {"name":"Biomamba","Date":2023,"major":"Bioinformatics"}mylen =len(mydict)print(mylen)
## 3
temp_len =0while temp_len < mylen:print(f"键值{list(mydict.keys())[temp_len]}对应的value为:{mydict[list(mydict.keys())[temp_len]]}")    temp_len +=1# 多写了很多行
## 键值name对应的value为:Biomamba## 键值Date对应的value为:2023## 键值major对应的value为:Bioinformatics

七、总结

9.7.1 分类

是否支持下标索引:支持: 列表、元组、字符串 - 序列类型不支持:集合、字典 - 非序列类型

是否支持重复元素:支持:列表、元组、字符串 - 序列类型不支持:集合、字典 - 非序列类型

是否可以修改:支持:列表、集合、字典 - 序列类型不支持:元组、字符串 - 非序列类型

是否支持遍历:for循环:五类数据容器都支持while循环:列表、元组、字符串支持,集合、字典无法直接参与while循环

9.7.2 通用操作

max():得到最大的元素min():得到最小的元素sorted(容器,[reverse = False]):ASCII码升序排序sorted(容器,[reverse = True]):ASCII码降序排序

9.7.3 容器相互转换

list(其它容器)tuple(其它容器)str(其它容器)set(其它容器)

往期回顾

生信Python速查手册

Python安装(Windows+Linux)

Python的"Rstudio"——Pycharm

码Python神器:jupyter notebook

一文了解Python基础:字面量、注释、变量、类型、运算符

Python判断语句

Python循环语句

Python函数与方法

如何联系我们

留一个领取资料开箱即用的单细胞分析镜像微信号[Biomamba_zhushou],方便各位随时交流。同时我们也构建了交流群矩阵欢迎大家入群讨论。
大家可以阅读完这几篇之后添加
给生信入门初学者的小贴士
没有检索,就没有发言权

已有生信基地联系方式的同学无需重复添加

您点的每个赞和在看,我都认真当成了喜欢

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-08 12:33:21 HTTP/2.0 GET : https://f.mffb.com.cn/a/464238.html
  2. 运行时间 : 0.190078s [ 吞吐率:5.26req/s ] 内存消耗:4,685.02kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=75635f69f662ca4a35bbdd6b4f940ade
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000829s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000837s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000638s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000289s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000424s ]
  6. SELECT * FROM `set` [ RunTime:0.000209s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000689s ]
  8. SELECT * FROM `article` WHERE `id` = 464238 LIMIT 1 [ RunTime:0.000583s ]
  9. UPDATE `article` SET `lasttime` = 1770525201 WHERE `id` = 464238 [ RunTime:0.013077s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.008927s ]
  11. SELECT * FROM `article` WHERE `id` < 464238 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.006786s ]
  12. SELECT * FROM `article` WHERE `id` > 464238 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000394s ]
  13. SELECT * FROM `article` WHERE `id` < 464238 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.006628s ]
  14. SELECT * FROM `article` WHERE `id` < 464238 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000697s ]
  15. SELECT * FROM `article` WHERE `id` < 464238 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.006901s ]
0.191723s