From 3df9eef6b02fa2a2118fec6c0e3b5f9ceb5cef16 Mon Sep 17 00:00:00 2001 From: bilibili <fenggaobuke@gmail.com> Date: Thu, 31 Oct 2019 23:31:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8random.choice=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...07\347\253\240\347\224\237\346\210\220\345\231\250.py" | 8 ++++---- 1 file changed, 4 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 784c478..1d8ce7d 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" @@ -175,9 +175,9 @@ xx = "å¦ç”Ÿä¼šé€€ä¼š" ] 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)] ) + xx = random.choice(å人å言) + xx = xx.replace( "a", random.choice(å‰é¢åž«è¯)) + xx = xx.replace( "b", random.choice(åŽé¢åž«è¯)) return xx def å¦èµ·ä¸€æ®µ(): @@ -196,6 +196,6 @@ for x in xx: elif 分支 < 20 : tmp += æ¥ç‚¹å人å言() else: - tmp += 废è¯[random.randint(0,len(废è¯)-1)] + tmp += random.choice(废è¯) tmp = tmp.replace("x",xx) print(tmp) -- GitLab