Random license plates

 The simple program makes a simple 3 letter and 3 digit license plate, in the form LLL-DDD. It just picks 3 random letters from a list of letters, then 3 random digits.

def license_plate():
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
i = 0
alphabet_array = []
while i != len(alphabet):
alphabet_array.append(alphabet[i])
i += 1
output = ""
for x in range(0, 3):
output += alphabet[random.randint(0, 25)]
output += "-"
for x in range(0, 3):
output += str(random.randint(0, 9))
return output

Comments