My issue
When I’m pressing the “Debug my code” button, I’m getting a blank screen instead of seeing the failed test case.
My code
import re
t = int(input())
for _ in range(t):
s = input()
valid = "YES"
# lower case characters should be present
x = re.search("[a-z]", s)
if not x:
valid = "NO"
#number of characters is more than 9
if len(s) < 10:
valid = "NO"
# Digits are strictly inside all the other characters
y = re.search("\D+[0-9]\D+", s)
if not y:
valid = "NO"
# Must have one uppercase character strictly inside
z = re.search(".+[A-Z].+", s)
if not z:
valid = "NO"
# Must have one of the given special characters, strictly inside
a = re.search(".+[@#%&?].+", s)
if not a:
valid = "NO"
print(valid)
Learning course: Level up from 1* to 2*
Problem Link: CodeChef: Practical coding for everyone