In html, color represents the most commonly used 6-digit hexadecimal code notation. In addition, color can also be represented by rgb (r, g, B). r, g, B Represents red, green, and blue in decimal number or percentage from 0 to, respectively. If you are interested, you can see that there are 3 Representation Methods in the HTML, the most commonly used is the
Generation ID template: year, month, day, hour, minute, and second + 6-digit auto-increment code
Because the order ID, product ID, or any ID is generated, and you do not want to use auto-increment, and are afraid of repetition, you can use the year and day minute and second + 6-dig
Python3 randomly generates a 6-digit verification CodeRequirements are numbers: 0~9 and uppercase and lowercase letters.#!/usr/bin/env python#-*-coding:utf-8-*-# author:hiuhung wanimport random# 48--57:0-9# 65--90:a-z# 97--122:a-zinde x = 6count = 0STR1 = " #存放验证码while index > Count: num = Random.randrange (48,122) if (num The effect is as followsC:\Python36\python.exe d:/py/1704/day04/Random Ver
cardinality collection, and the cardinality default value is 1. random.randrange ([start,]stop[,step]) parameter start-- start value within the specified range, contained within the range. stop-- the end value within the specified range, not contained within the range. step-- specifies the increment cardinality. The Randrange () and Randint () differ from the random module by specifying a cardinality, which defaults to 1 "checkcode=" "ForiiNrange (6)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.