🔄Update: 引入模板框架

This commit is contained in:
2026-01-14 09:57:04 +08:00
parent f73b3308ce
commit 1a3a7f5a23
33 changed files with 2676 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
# example.py
def factorial_generator(n):
result = 1
for i in range(1, n + 1):
result *= i
yield result
gen = factorial_generator(5)
for value in gen:
print(value)