#!/usr/bin/env python# coding:UTF-8"""@version: python3.x@author:曹新健@contact: 617349013@@software: PyCharm@file: 生成随机字符串.py@time: /9/10 16:54"""import randomrandomStr= ""for i in range(6):temp = random.randrange(0,3)if temp == 0:ch = chr(random.randrange(ord('A'),ord('Z') + 1))randomStr += chelif temp == 1:ch = chr(random.randrange(ord('a'),ord('z') + 1))randomStr += chelse:ch = str((random.randrange(0,10)))randomStr += chprint(randomStr)
1200字范文,内容丰富有趣,写作的好帮手!