import random
love = ['i','l','o','v','e','y','o','u']kk = 'iloveyou'z = []n = 0i = 0while True: i = i + 1 print(i) for k in range(7): z.append(random.choice(kk)) print(z) if z == love: n = n + 1 print(z) print(n) exit() z = []本文共 282 字,大约阅读时间需要 1 分钟。
import random
love = ['i','l','o','v','e','y','o','u']kk = 'iloveyou'z = []n = 0i = 0while True: i = i + 1 print(i) for k in range(7): z.append(random.choice(kk)) print(z) if z == love: n = n + 1 print(z) print(n) exit() z = []转载于:https://www.cnblogs.com/hyolyn/p/8290573.html