Embedded_game/002_B_Car/001_len_test2.py
2025-01-02 12:48:11 +08:00

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, "不是")