Python隨機生成一個六位數的驗證碼

import random str = "" str1 = "" list = [] index = 0 num = 0 while num < 6: x = random.choice(range(12)) # 對隨機生成的字符進行隨機排序 if x < 4: list.append(chr(random.choice(range(10)) + 48))
相關文章
相關標籤/搜索