From 792d8c0862e8ab5b418dce3ff8e29511dd40d455 Mon Sep 17 00:00:00 2001
From: Sunbread <sunbread233@gmail.com>
Date: Fri, 1 Nov 2019 03:09:36 +0800
Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E6=96=87=E7=AB=A0=E5=B1=80?=
 =?UTF-8?q?=E9=83=A8=E8=BF=87=E4=BA=8E=E5=86=85=E5=AE=B9=E9=87=8D=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ...40\347\224\237\346\210\220\345\231\250.py" | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git "a/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py" "b/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py"
index f399736..059f17e 100644
--- "a/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py"
+++ "b/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py"
@@ -174,10 +174,21 @@ xx = "学生会退会"
     "说过一句富有哲理的话",
 ]
 
+def 洗牌遍历(列表):
+    池 = list(列表)
+    while True:
+        random.shuffle(æ± )
+        for 元素 in 池:
+            yield 元素
+
+下一句废话 = 洗牌遍历(废话)
+下一句名人名言 = 洗牌遍历(名人名言)
+
 def 来点名人名言():
-    xx = 名人名言[random.randint(0,len(名人名言)-1)]
-    xx = xx.replace(  "a",前面垫话[random.randint(0,len(前面垫话)-1)] )
-    xx = xx.replace(  "b",后面垫话[random.randint(0,len(后面垫话)-1)] )
+    global 下一句名人名言
+    xx = next(下一句名人名言)
+    xx = xx.replace(  "a",random.choice(前面垫话) )
+    xx = xx.replace(  "b",random.choice(后面垫话) )
     return xx
 
 def 另起一段():
@@ -196,6 +207,6 @@ for x in xx:
         elif 分支 < 20 :
             tmp += 来点名人名言()
         else:
-            tmp += 废话[random.randint(0,len(废话)-1)]
+            tmp += next(下一句废话)
     tmp = tmp.replace("x",xx)
     print(tmp)
-- 
GitLab