23 lines
645 B
Python
23 lines
645 B
Python
# -*- coding:utf-8 -*-
|
|
# @Author len
|
|
# @Create 2023/12/12 19:49
|
|
|
|
|
|
def if_plate( text):
|
|
if len(text) == 6:
|
|
allowed_chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
for char in text:
|
|
print(char)
|
|
if char not in allowed_chars:
|
|
print("chat:", char)
|
|
return False
|
|
return True
|
|
else:
|
|
return False
|
|
|
|
list = ["A13C46", "124141", "AAAAAA", "AFF3241", "fafdafsfas",'A13C46', "124!@$%$%#@@#$%#@!@#$%#@!", "fsd65", "A1/2B%34", "((n*y+h)^4)/100"]
|
|
for i in list:
|
|
if if_plate(i):
|
|
print(i, "是")
|
|
else:
|
|
print(i, "不是") |