zzhcn @ 2024-09-28 15:36:58
a1 = input().split(',') for i in a1: n1, n2, n3, n4, n5, f = 0, 0, 0, 0, 0, 0 if 5 < len(i) < 13: for j in i: if int(ord('a')) <= int(ord(j)) <= int(ord('z')): n1 += 1 elif int(ord('A')) <= int(ord(j)) <= int(ord('Z')): n2 += 1 elif int(ord('0')) <= int(ord(j)) <= int(ord('9')): n3 += 1 elif j in '@#!$': n4 += 1 else: n5 += 1 if n1 > 0: f += 1 if n2 > 0: f += 1 if n3 > 0: f += 1 if f >= 2 and n4 >= 1 and n5 == 0: print(i)
by Exschawasion @ 2024-09-28 15:39:55
you code pretty python
by Exschawasion @ 2024-09-28 15:43:52
a1 = input().split(',')
for i in a1:
n1, n2, n3, n4, n5, f = 0, 0, 0, 0, 0, 0
if 5 < len(i) < 13:
for j in i:
if int(ord('a')) <= int(ord(j)) <= int(ord('z')):
n1 += 1
elif int(ord('A')) <= int(ord(j)) <= int(ord('Z')):
n2 += 1
elif int(ord('0')) <= int(ord(j)) <= int(ord('9')):
n3 += 1
elif j in '@#!$':
n4 += 1
else:
n5 += 1
if n1 > 0:
f += 1
if n2 > 0:
f += 1
if n3 > 0:
f += 1
if f >= 2 and n4 >= 1 and n5 == 0:
print(i)