当前位置:首页>python>《嵌入式AI筑基笔记03:Python流程控制,从C的严谨到Python的简洁》

《嵌入式AI筑基笔记03:Python流程控制,从C的严谨到Python的简洁》

  • 2026-03-26 11:47:23
《嵌入式AI筑基笔记03:Python流程控制,从C的严谨到Python的简洁》

《嵌入式AI筑基笔记03:Python流程控制,从C的严谨到Python的简洁》

前言

C语言的流程控制,靠的是括号、花括号和严谨的语法;Python则用缩进、冒号和更人性化的关键字,让代码如诗般简洁。

分支结构

if-elif-else 结构

• Python的条件判断无需括号,用冒号和缩进界定代码块。
• 多分支使用 elif,替代C语言的 else if
• 示例代码
# if - elif - else# 示例:判断闰年,闰年 = 能被 4 整除,不能被 100 整除,能被 400 整除year = 2026if ((year % 4) == 0 and (year % 100)) != 0 or (year % 400) == 0:    print(f'{year}是闰年')else:    print(f'{year}不是闰年')# 依据分数进行评级# >=90 A     70-90 B     <=70 Cscore = 88if score >= 90:    print(f'{score} is level A')elif score > 70:    print(f'{score} is level B')else:    print(f'{score} is level C')# 输入月份,判断有多少天,不考虑闰年month = 5if month in [1, 3, 5, 7, 8, 10, 12]:    days = 31elif month in [4, 6, 9, 11]:    days = 30elif month == 2:    days = 28else:    days = Noneprint(f"{month}月有{days}天"

条件表达式

• 替代C语言的三目运算符
• C语言:max = a > b ? a : b;
• Python:max_val = a if a > b else b
• 示例代码
# 条件表达式替代三目运算符# 取绝对值a = -20abs_a = a if a > 0 else -aprint(a, abs_a)# 取最大值和最小值a, b, c = 10, 20, -21max_num = a if (a > b and a > c) else b if b > c else cmin_num = a if (a < b and a < c) else b if b < c else cprint(max_num, min_num)     # 20 -21

match-case 结构

• 类似于C的 switch-case,但功能更强大,支持模式匹配。
• Python 3.10以上版本支持
• 示例代码
# match-case 结构# 类似于C语言的switch-case# 根据状态码返回消息status = 404match status:    case 200:        msg = "OK"    case 404:        msg = "Not Found"    case 500:        msg = "Internal Server Error"    case _: # 相当于default        msg = "Unknown"print(msg)  # Not Found

C程序员的视角

  • • Python的条件判断去掉了括号和花括号,改用冒号和缩进,强迫代码整洁。
  • • elif 比 else if 少敲一个字符,但逻辑一致。
  • • 条件表达式 x if cond else y 比C的三目运算符更接近自然语言。
  • • match-case 不仅替代了 switch-case,还能解包、匹配类型,是C语言无法比拟的。

循环结构

while循环

• 与C几乎一致,只是条件无需括号,记得冒号和缩进。
• 示例代码
# while 结构跟C语言类似,只是条件无需括号,记得冒号和缩进。# 计算 1-10 的和i, sum = 1, 0while i<10:    sum += i    i += 1print(sum)  # 45# 循环嵌套# *# **# ***i = 1while i <= 3:    j = 1    while j <= i:        print("*", end = "")        j += 1    print("")    i += 1

for 循环

• C的 for 基于索引,Python的 for 基于迭代器,直接遍历可迭代对象。
• 示例代码
# for 语句# 遍历字符串统计元音s = "hello world"vowel_count = 0for ch in s:    if ch in "aeiou":        vowel_count += 1print(vowel_count)  # 3# 求 1/1 - 1/2 + 1/3 - 1/4  ……… + 1/97 - 1/98 + 1/99 - 1/100的结果res = 0for i in range(1, 101):    if i % 2 == 0:        res -= 1 / i    else :        res += 1 / iprint(res)      # 0.688172179310195# 循环嵌套, 打印乘法表# 1*1=1# 2*1=2    2*2=4# 3*1=3    3*2=6    3*3=9# 4*1=4    4*2=8    4*3=12    4*4=16for i in range(1, 5):    for j in range(1, i+1):        print(f'{i}*{j}={i*j}',end='\t')    print()

range() 函数

• 用于生成数字序列
• range(start, stop, step=1)
  • • start 起始值(含), stop 结束值(不含),范围[start, stop)
    • step 步长,默认为1,负数表示反向遍历
• 示例代码
# range() 用于生成数字序列print(list(range(5)))           # [0, 1, 2, 3, 4]print(list(range(5, 10)))       # [5, 6, 7, 8, 9]print(list(range(5, 10, 2)))    # [5, 7, 9]print(list(range(10, 5, -1)))   # [10, 9, 8, 7, 6]# 打印1到10的偶数for i in range(2, 11, 2):    print(i, end=' ')  # 2 4 6 8 10print()# 反向遍历for i in range(10, 0, -2):    print(i, end=' ')  # 10 8 6 4 2print()

C程序员的视角

  • • while 循环几乎照搬,但Python必须加冒号,且无括号。
  • • for 循环彻底改变:不再是索引循环,而是遍历任何可迭代对象。这让代码更安全(不会越界)、更简洁。
  • • range() 相当于C里手动写循环变量和边界,但更清晰。
  • • 没有 do-while 循环

循环控制

continue语句

• 用法与C完全一致,跳过本次迭代。
• 示例代码
# continue语句,用法与C完全一致,跳过本次迭代for i in range(5):    if i == 2:        continue    print(i, end=' ')  # 0 1 3 4print()

break 语句

• 用法与C完全一致,主动结束循环
• 要写在循环中, 作用是主动结束循环,break之后的语句不会再执行
• break只会跳出当前这一层循环(在循环嵌套的情况下)
• break 和 for-else(while-else) 结合使用
• 示例代码
# break 语句,用法与C完全一致,主动结束循环for i in range(10):    if i == 5:        break    print(i, end=' ')   # 0 1 2 3 4print()

pass 占位符

• Python中需要语法占位但逻辑为空时使用
• 占位的作用,类似C语言空语句
• 没有任何语义, 占位语句, 作用是防止报错
• 示例代码
# pass 占位符,防止报错if True:    pass  # 以后补代码

循环-else

• python 特色,当循环正常结束(没有被 break 打断)时,执行 else 块
• 需要和break结合使用
• breakelse只会执行其中一个
• else执行是在for正常循环结束后才执行(没有执行break)
• 示例代码
# 循环-else, python特色,当循环正常结束(没有被break打断)时,执行else块# 判断某数是不是质数num = 17for i in range(2, num):    if num % i == 0:        print(f"{num}不是质数")        breakelse:    print(f"{num}是质数")      # 17是质数# 检查列表是否全为正数nums = [3, 5, -1, 7]for n in nums:    if n < 0:        print("存在负数")       # 存在负数        breakelse:    print("全部为正数")

C程序员的视角

  • • break/continue 用法相同。
  • • pass 相当于C的空语句 ;,但更直观。
  • • 循环 else 是Python独创,可以优雅地处理“循环未被中断”的场景,省去了设置标志位的麻烦。

推导式

• 推导式是Python最令人惊艳的特性之一。它用一种极其简洁的语法,从可迭代对象中快速生成新的列表、字典或集合,同时还能嵌入条件过滤和嵌套循环。
• 推导式的基本结构可以理解为:[输出表达式 for 元素 in 可迭代对象 if 条件]
• 其中 if 条件 是可选的,还可以有多个 for 子句实现嵌套循环。

列表推导式

• 语法[expression for item in iterable if condition]
• 示例代码
# 列表推导式# 生成平方数列表squares = [x**2 for x in range(1, 6)]print(squares)  # [1, 4, 9, 16, 25]# 只保留0~9中的偶数evens = [x for x in range(10) if x % 2 == 0]print(evens)  # [0, 2, 4, 6, 8]# 生成二维坐标对coord = [(x, y) for x in range(3) for y in range(2)]print(coord)  # [(0,0), (0,1), (1,0), (1,1), (2,0), (2,1)]# 将字符串列表转换为大写words = ["hello", "world", "python"]upper_words = [w.upper() for w in words]print(upper_words)  # ['HELLO', 'WORLD', 'PYTHON']# 将奇数变为负数,偶数保持不变nums = [1, 2, 3, 4, 5]transformed = [x if x % 2 == 0 else -x for x in nums]print(transformed)  # [-1, 2, -3, 4, -5]

字典推导式

• 语法{key_expression: value_expression for item in iterable if condition}
• 示例代码
# 字典推导式# 数字与其平方的映射square_dict = {x: x**2 for x in range(1, 6)}print(square_dict)  # {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}# 键值互换original = {'a': 1, 'b': 2, 'c': 3}swapped = {v: k for k, v in original.items()}print(swapped)  # {1: 'a', 2: 'b', 3: 'c'}# 只保留长度大于3的单词及其长度words = ["cat", "elephant", "dog", "tiger"]word_len = {w: len(w) for w in words if len(w) > 3}print(word_len)  # {'elephant': 8, 'tiger': 5}

集合推导式

• 语法{expression for item in iterable if condition}
• 示例代码
# 集合推导式# 去重并求平方,集合自动去重,一行代码完成去重+映射+集合生成。nums = [1, 2, 2, 3, 4, 4, 5]unique_squares = {x**2 for x in nums}print(unique_squares)  # {1, 4, 9, 16, 25}# 提取字符串中的元音字母(去重)s = "hello world"vowels = {ch for ch in s if ch in "aeiou"}print(vowels)  # {'e', 'o'}

C程序员的视角

  • • 推导式是Python对“循环+条件+构建集合”这一高频场景的极致抽象。
  • • 在C语言中,你至少要写:一个循环(for/while)、条件判断(if)、临时变量或动态数组的分配、手动添加元素到容器(可能需要动态扩容)。
  • • 而在Python中,所有细节都被封装成一行声明式代码。这不仅让代码量锐减(通常减少70%以上),还让意图一目了然:[x**2 for x in range(10) if x%2] 直接读作“取0到9中奇数的平方”。
  • • 推导式在底层由C语言实现,执行效率通常高于手动编写的Python循环。

迭代器与生成器

迭代器(Iterator)

• 迭代器是访问集合元素的一种方式
• 迭代器可以记住遍历的位置,从第一个元素开始,直到所有元素访问完毕
• 任何实现了 __iter__() 和 __next__() 方法的对象都是迭代器
• 使用 iter() 可将可迭代对象转为迭代器
• next() 依次获取元素,直到抛出 StopIteration 异常。
• 迭代器Iterator,可迭代对象Iterable
• 示例代码
# 迭代器是访问集合元素的一种方式# 迭代器可以记住遍历的位置,从第一个元素开始,直到所有元素访问完毕# 任何实现了 `__iter__()` 和 `__next__()` 方法的对象都是迭代器# 迭代器Iterator,可迭代对象Iterablefruits = ["apple", "banana", "cherry"]it = iter(fruits)                   # 获取迭代器print(next(it), next(it), next(it)) # apple banana cherry# print(next(it))                   # 抛出 StopIteration 异常

生成器(Generator)

• 生成器是一种特殊的迭代器,它不需要手动实现 __iter__() 和 __next__(),而是通过两种方式创建:生成器函数(使用 yield)和生成器表达式(类似列表推导式,但用圆括号)
• 生成器的核心特点是惰性求值:它不会一次性生成所有值,而是在每次迭代时按需生成下一个值,因此内存效率极高,特别适合处理大数据流或无限序列
生成器函数(Generator Function)
• 函数内部要有 yield 关键字。
• 调用生成器函数不会执行函数体,而是返回一个生成器对象。
• 每次调用 next() 或进行迭代时,函数从上次 yield 的地方继续执行,直到遇到下一个 yield 或函数结束。
• 自动保存执行状态(局部变量、指令指针等)。
• 遇到 yield会暂停,也可以返回值
• 函数结束或遇到 return 会抛出 StopIteration
• 示例代码
# 生成器函数def fn():    print('AAAA')    yield 666    # 类似return的返回值,但是不会结束函数    print('BBBB')    yield 888g = fn()print(g)  # <generator object fn at 0x000001A8B8498660>print(next(g))  # AAAA  666print(next(g))  # BBBB  888# 生成斐波那契数列def fibonacci(n):    a, b = 0, 1    count = 0    while count < n:        yield a        a, b = b, a + b        count += 1for num in fibonacci(10):    print(num, end=' ')  # 0 1 1 2 3 5 8 13 21 34print()# 写一个生成器函数, 得到前10个斐波那契数,写法1# 斐波那契数列如下:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...#                a  b#                   a  b#                      a  bdef fn():    a, b = 0, 1    while True:        yield a        b = a + b        yield b        a = a + bg = fn()for i in range(10):    print(next(g), end=' ')     # 0 1 1 2 3 5 8 13 21 34print()# 写一个生成器函数, 得到前10个斐波那契数,写法2def fn():    a, b = 0, 1    while True:        yield a        a, b = b, a + bg = fn()for i in range(10):    print(next(g), end=' ')     # 0 1 1 2 3 5 8 13 21 34print()# 无限计数器(不会耗尽内存)def infinite_counter():    i = 0    while True:        yield i        i += 1counter = infinite_counter()for _ in range(5):    print(next(counter), end=' ')  # 0 1 2 3 4

生成器函数的优势

  • • 内存友好:一次只产生一个值,不占用大量内存。
  • • 状态保持:自动保存执行现场,无需手动维护静态变量或闭包。
  • • 代码简洁:用同步方式写迭代逻辑,无需手动实现迭代器类。
生成器表达式(Generator Expression)
• 与列表推导式语法几乎相同,但使用圆括号 () 而不是方括号 []
• 生成器表达式返回一个生成器对象,而不是一次性构建整个列表。
• 语法(expression for item in iterable if condition)
• 示例代码
# 生成器表达式# 生成器与列表推导式很像,只是[]->()print([i for i in "ABC"])       # 列表推导式 ['A', 'B', 'C']# 生成器,不能直接打印,可以强转之后打印,不过会消耗内存print((i for i in "ABC"))       # <generator object <genexpr> at 0x000002A7141F5CF0># 使用 next 访问g = (i for i in range(2, 4))print(next(g), next(g))         # 2, 3# print(next(g))  # 报错 StopIteration# 使用 for 访问g = (i for i in range(2, 5))for i in g:    print('i =', i, end='\t')   # i = 2     i = 3    i = 4print()# 过滤并转换数据nums = [1, 2, 3, 4, 5, 6]even_squares = (x**2 for x in nums if x % 2 == 0)print(list(even_squares))  # [4, 16, 36]

生成器表达式的优势

  • • 语法极简:一行代码替代多行循环,且惰性求值。
  • • 配合函数使用:如 sum()max()min() 等,直接传入生成器表达式,高效且简洁。
  • • 组合管道:多个生成器可以串联,形成数据流式处理,中间不产生临时列表。

C程序员的视角

生成器是Python对“迭代状态机”的优雅封装。在C语言中,要实现类似功能,往往需要:

  • • 手动定义结构体保存状态(局部变量、位置计数器)。
  • • 编写函数维护状态并在每次调用时返回下一个值( get_next())。
  • • 处理结束标志和资源释放。

而Python的生成器函数自动完成了这一切:yield 保存上下文,函数局部变量在暂停期间被保留,再次调用时无缝恢复。生成器表达式则用声明式语法实现了流式数据处理,让代码更贴近数学表达式。

总结

从C到Python,流程控制的演进体现了两种语言的设计哲学差异:

  • • 条件判断:Python去掉了括号和花括号,用缩进和冒号强迫代码整洁;match-case 提供了比 switch 更强大的模式匹配。
  • • 循环:Python的 for 是迭代器循环,可遍历任何可迭代对象;range() 替代了索引循环;循环 else 子句是独创的语法。
  • • 推导式:一行代码实现循环+条件+集合构建,是Python最具代表性的特性之一。
  • • 生成器与迭代器:延迟计算、按需生成,让内存管理更智能,特别适合大数据处理。

这些特性让Python在保持逻辑清晰的同时,大幅提升开发效率。下一篇我们将进入函数与模块,探索Python如何定义和复用代码,包括参数传递、作用域、lambda表达式等。

如果你也是从C转Python,欢迎继续关注这个系列。我们一起,从底层走向AI。

接下来学什么

这只是Python学习的第三篇。按照计划,后面还有:

第一篇:语法规则(与 C 的对比) ✅ 已完成第二篇:数据结构:列表、元组、字典、集合 ✅ 已完成第三篇:流程控制:条件、循环、推导式 ✅ 已完成第四篇:函数与模块:定义、参数、作用域 ⏳ 准备中第五篇:对象和类:Class ⏳第六篇:文件操作与异常处理 ⏳第七篇:NumPy 入门:像操作内存一样操作数据 ⏳第八篇:Pandas 基础:给数据“做表格” ⏳

一步一步来,不急。

完整代码

''' * @Filename : python_flow.py * @Revision : $Revision: 1.00 $ * @Author : Feng(更多编程相关的知识和源码见微信公众号:不只会拍照的程序猿,欢迎订阅) * @Description : python 流程控制'''# ###################### 分支语句 ###################### ## if - elif - else# 示例:判断闰年,闰年 = 能被 4 整除,不能被 100 整除,能被 400 整除year = 2026     # 2026不是闰年if ((year % 4) == 0 and (year % 100)) != 0 or (year % 400) == 0:    print(f'{year}是闰年')else:    print(f'{year}不是闰年')# 依据分数进行评级# >=90 A     70-90 B     <=70 Cscore = 88      # 88 is level Bif score >= 90:    print(f'{score} is level A')elif score > 70:    print(f'{score} is level B')else:    print(f'{score} is level C')# 输入月份,判断有多少天,不考虑闰年month = 5if month in [1, 3, 5, 7, 8, 10, 12]:    days = 31elif month in [4, 6, 9, 11]:    days = 30elif month == 2:    days = 28else:    days = Noneprint(f"{month}月有{days}天")  # 5月有31天# 条件表达式替代三目运算符# 取绝对值a = -20abs_a = a if a > 0 else -aprint(a, abs_a)# 取最大值和最小值a, b, c = 10, 20, -21max_num = a if (a > b and a > c) else b if b > c else cmin_num = a if (a < b and a < c) else b if b < c else cprint(max_num, min_num)     # 20 -21# # match-case 结构# # 类似于C语言的switch-case# # 根据状态码返回消息# status = 404# match status:#     case 200:#         msg = "OK"#     case 404:#         msg = "Not Found"#     case 500:#         msg = "Internal Server Error"#     case _: # 相当于default#         msg = "Unknown"# print(msg)  # Not Found# ###################### 循环语句 ###################### ## while 结构跟C语言类似,只是条件无需括号,记得冒号和缩进。# 计算 1-10 的和i, sum = 1, 0while i<10:    sum += i    i += 1print(sum)  # 45# 循环嵌套# *# **# ***i = 1while i <= 3:    j = 1    while j <= i:        print("*", end = "")        j += 1    print("")    i += 1# for 语句# 遍历字符串统计元音s = "hello world"vowel_count = 0for ch in s:    if ch in "aeiou":        vowel_count += 1print(vowel_count)  # 3# 求 1/1 - 1/2 + 1/3 - 1/4  ……… + 1/97 - 1/98 + 1/99 - 1/100的结果res = 0for i in range(1, 101):    if i % 2 == 0:        res -= 1 / i    else :        res += 1 / iprint(res)      # 0.688172179310195# 循环嵌套, 打印乘法表# 1*1=1# 2*1=2    2*2=4# 3*1=3    3*2=6    3*3=9# 4*1=4    4*2=8    4*3=12    4*4=16for i in range(1, 5):    for j in range(1, i+1):        print(f'{i}*{j}={i*j}',end='\t')    print()# range() 用于生成数字序列print(list(range(5)))           # [0, 1, 2, 3, 4]print(list(range(5, 10)))       # [5, 6, 7, 8, 9]print(list(range(5, 10, 2)))    # [5, 7, 9]print(list(range(10, 5, -1)))   # [10, 9, 8, 7, 6]# 打印1到10的偶数for i in range(2, 11, 2):    print(i, end=' ')  # 2 4 6 8 10print()# 反向遍历for i in range(10, 0, -2):    print(i, end=' ')  # 10 8 6 4 2print()# ###################### 循环控制 ###################### ## continue语句,用法与C完全一致,跳过本次迭代for i in range(5):    if i == 2:        continue    print(i, end=' ')  # 0 1 3 4print()# break 语句,用法与C完全一致,主动结束循环for i in range(10):    if i == 5:        break    print(i, end=' ')   # 0 1 2 3 4print()# pass 占位符,防止报错if True:    pass  # 以后补代码# 循环-else, python特色,当循环正常结束(没有被break打断)时,执行else块# 判断某数是不是质数num = 17for i in range(2, num):    if num % i == 0:        print(f"{num}不是质数")        breakelse:    print(f"{num}是质数")      # 17是质数# 检查列表是否全为正数nums = [3, 5, -1, 7]for n in nums:    if n < 0:        print("存在负数")       # 存在负数        breakelse:    print("全部为正数")# ###################### 推导式 ###################### ## 列表推导式# 生成平方数列表squares = [x**2 for x in range(1, 6)]print(squares)  # [1, 4, 9, 16, 25]# 只保留0~9中的偶数evens = [x for x in range(10) if x % 2 == 0]print(evens)  # [0, 2, 4, 6, 8]# 生成二维坐标对coord = [(x, y) for x in range(3) for y in range(2)]print(coord)  # [(0,0), (0,1), (1,0), (1,1), (2,0), (2,1)]# 将字符串列表转换为大写words = ["hello", "world", "python"]upper_words = [w.upper() for w in words]print(upper_words)  # ['HELLO', 'WORLD', 'PYTHON']# 将奇数变为负数,偶数保持不变nums = [1, 2, 3, 4, 5]transformed = [x if x % 2 == 0 else -x for x in nums]print(transformed)  # [-1, 2, -3, 4, -5]# 字典推导式# 数字与其平方的映射square_dict = {x: x**2 for x in range(1, 6)}print(square_dict)  # {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}# 键值互换original = {'a': 1, 'b': 2, 'c': 3}swapped = {v: k for k, v in original.items()}print(swapped)  # {1: 'a', 2: 'b', 3: 'c'}# 只保留长度大于3的单词及其长度words = ["cat", "elephant", "dog", "tiger"]word_len = {w: len(w) for w in words if len(w) > 3}print(word_len)  # {'elephant': 8, 'tiger': 5}# 集合推导式# 去重并求平方,集合自动去重,一行代码完成去重+映射+集合生成。nums = [1, 2, 2, 3, 4, 4, 5]unique_squares = {x**2 for x in nums}print(unique_squares)  # {1, 4, 9, 16, 25}# 提取字符串中的元音字母(去重)s = "hello world"vowels = {ch for ch in s if ch in "aeiou"}print(vowels)  # {'e', 'o'}# ################## 迭代器与生成器 ################### ## 迭代器是访问集合元素的一种方式# 迭代器可以记住遍历的位置,从第一个元素开始,直到所有元素访问完毕# 任何实现了 `__iter__()` 和 `__next__()` 方法的对象都是迭代器# 迭代器Iterator,可迭代对象Iterablefruits = ["apple", "banana", "cherry"]it = iter(fruits)                   # 获取迭代器print(next(it), next(it), next(it)) # apple banana cherry# print(next(it))                   # 抛出 StopIteration 异常# 生成器函数def fn():    print('AAAA')    yield 666    # 类似return的返回值,但是不会结束函数    print('BBBB')    yield 888g = fn()print(g)  # <generator object fn at 0x000001A8B8498660>print(next(g))  # AAAA  666print(next(g))  # BBBB  888# 生成斐波那契数列def fibonacci(n):    a, b = 0, 1    count = 0    while count < n:        yield a        a, b = b, a + b        count += 1for num in fibonacci(10):    print(num, end=' ')  # 0 1 1 2 3 5 8 13 21 34print()# 写一个生成器函数, 得到前10个斐波那契数,写法1# 斐波那契数列如下:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...#                a  b#                   a  bdef fn():    a, b = 0, 1    while True:        yield a        b = a + b        yield b        a = a + bg = fn()for i in range(10):    print(next(g), end=' ')     # 0 1 1 2 3 5 8 13 21 34print()# 写一个生成器函数, 得到前10个斐波那契数,写法2def fn():    a, b = 0, 1    while True:        yield a        a, b = b, a + bg = fn()for i in range(10):    print(next(g), end=' ')     # 0 1 1 2 3 5 8 13 21 34print()# 无限计数器(不会耗尽内存)def infinite_counter():    i = 0    while True:        yield i        i += 1counter = infinite_counter()for _ in range(5):    print(next(counter), end=' ')  # 0 1 2 3 4# 生成器表达式# 生成器与列表推导式很像,只是[]->()print([i for i in "ABC"])       # 列表推导式 ['A', 'B', 'C']# 生成器,不能直接打印,可以强转之后打印,不过会消耗内存print((i for i in "ABC"))       # <generator object <genexpr> at 0x000002A7141F5CF0># 使用 next 访问g = (i for i in range(2, 4))print(next(g), next(g))         # 2, 3# print(next(g))  # 报错 StopIteration# 使用 for 访问g = (i for i in range(2, 5))for i in g:    print('i =', i, end='\t')   # i = 2     i = 3    i = 4print()# 过滤并转换数据nums = [1, 2, 3, 4, 5, 6]even_squares = (x**2 for x in nums if x % 2 == 0)print(list(even_squares))  # [4, 16, 36]

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-27 09:54:30 HTTP/2.0 GET : https://f.mffb.com.cn/a/481022.html
  2. 运行时间 : 0.091869s [ 吞吐率:10.89req/s ] 内存消耗:4,717.63kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=3e7ac1a902b662bec1673c8fde5695f1
  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.000522s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000796s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000337s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000277s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000487s ]
  6. SELECT * FROM `set` [ RunTime:0.000190s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000570s ]
  8. SELECT * FROM `article` WHERE `id` = 481022 LIMIT 1 [ RunTime:0.003495s ]
  9. UPDATE `article` SET `lasttime` = 1774576470 WHERE `id` = 481022 [ RunTime:0.003607s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000243s ]
  11. SELECT * FROM `article` WHERE `id` < 481022 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000465s ]
  12. SELECT * FROM `article` WHERE `id` > 481022 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000369s ]
  13. SELECT * FROM `article` WHERE `id` < 481022 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001204s ]
  14. SELECT * FROM `article` WHERE `id` < 481022 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001374s ]
  15. SELECT * FROM `article` WHERE `id` < 481022 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.006686s ]
0.094346s