Make a pattern for checking valid pincode

Import re
pincode = input(“Enter pincode”)
pattern = “^\d$”
search = re.findall(pattern,pincode)

If len (pincode) >= 6:
print(“valid”)
else:
print(“invalid”)

2 Likes

@kavinkumar300799

correct, keep it up.
Keep practising.

2 Likes

Very nice, keep it up… just replace ‘>’ with ‘=’

2 Likes

Yes mam Thank you so much

2 Likes